home *** CD-ROM | disk | FTP | other *** search
-
- /* A Bison parser, made from ../gcc-1.37/c-parse.y */
-
- #define IDENTIFIER 258
- #define TYPENAME 259
- #define SCSPEC 260
- #define TYPESPEC 261
- #define TYPE_QUAL 262
- #define CONSTANT 263
- #define STRING 264
- #define ELLIPSIS 265
- #define SIZEOF 266
- #define ENUM 267
- #define STRUCT 268
- #define UNION 269
- #define IF 270
- #define ELSE 271
- #define WHILE 272
- #define DO 273
- #define FOR 274
- #define SWITCH 275
- #define CASE 276
- #define DEFAULT 277
- #define BREAK 278
- #define CONTINUE 279
- #define RETURN 280
- #define GOTO 281
- #define ASM 282
- #define TYPEOF 283
- #define ALIGNOF 284
- #define ATTRIBUTE 285
- #define ASSIGN 286
- #define OROR 287
- #define ANDAND 288
- #define EQCOMPARE 289
- #define ARITHCOMPARE 290
- #define LSHIFT 291
- #define RSHIFT 292
- #define UNARY 293
- #define PLUSPLUS 294
- #define MINUSMINUS 295
- #define HYPERUNARY 296
- #define POINTSAT 297
-
- #line 39 "../gcc-1.37/c-parse.y"
-
- #include "config.h"
- #include "tree.h"
- #include "input.h"
- #include "c-parse.h"
- #include "c-tree.h"
-
- #include <stdio.h>
- #include <errno.h>
-
- #ifndef errno
- extern int errno;
- #endif
-
- void yyerror ();
-
- /* Cause the `yydebug' variable to be defined. */
- #define YYDEBUG 1
-
- #line 61 "../gcc-1.37/c-parse.y"
- typedef union {long itype; tree ttype; enum tree_code code; } YYSTYPE;
- #line 153 "../gcc-1.37/c-parse.y"
-
- /* the declaration found for the last IDENTIFIER token read in.
- yylex must look this up to detect typedefs, which get token type TYPENAME,
- so it is left around in case the identifier is not a typedef but is
- used in a context which makes it a reference to a variable. */
- static tree lastiddecl;
-
- static tree make_pointer_declarator ();
- static tree combine_strings ();
- static void reinit_parse_for_function ();
-
- /* List of types and structure classes of the current declaration. */
- tree current_declspecs;
-
- /* Stack of saved values of current_declspecs. */
- tree declspec_stack;
-
- int undeclared_variable_notice; /* 1 if we explained undeclared var errors. */
-
- static int yylex ();
-
- #ifndef YYLTYPE
- typedef
- struct yyltype
- {
- int timestamp;
- int first_line;
- int first_column;
- int last_line;
- int last_column;
- char *text;
- }
- yyltype;
-
- #define YYLTYPE yyltype
- #endif
-
- #include <stdio.h>
-
- #ifndef __STDC__
- #define const
- #endif
-
-
-
- #define YYFINAL 514
- #define YYFLAG -32768
- #define YYNTBASE 65
-
- #define YYTRANSLATE(x) ((unsigned)(x) <= 297 ? yytranslate[x] : 171)
-
- static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 61, 2, 2, 2, 48, 39, 2, 55,
- 57, 46, 44, 62, 45, 54, 47, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 34, 58, 2,
- 32, 2, 33, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 56, 2, 64, 38, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 63, 37, 59, 60, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 35, 36, 40, 41,
- 42, 43, 49, 50, 51, 52, 53
- };
-
- static const short yyrline[] = { 0,
- 176, 177, 184, 186, 186, 187, 189, 191, 192, 199,
- 205, 207, 209, 211, 213, 214, 215, 220, 226, 228,
- 229, 231, 236, 238, 239, 241, 246, 248, 249, 253,
- 255, 258, 260, 262, 264, 266, 268, 270, 274, 278,
- 281, 284, 287, 291, 293, 295, 297, 310, 312, 345,
- 349, 351, 354, 368, 370, 372, 374, 376, 378, 380,
- 382, 384, 386, 388, 390, 392, 394, 396, 398, 400,
- 402, 406, 455, 456, 458, 460, 462, 470, 482, 484,
- 486, 488, 490, 492, 497, 499, 503, 505, 508, 510,
- 511, 512, 519, 526, 531, 535, 537, 545, 548, 552,
- 554, 556, 564, 567, 569, 571, 580, 583, 587, 589,
- 597, 598, 599, 600, 604, 612, 613, 614, 617, 619,
- 622, 624, 627, 630, 638, 643, 644, 649, 654, 655,
- 661, 664, 669, 670, 674, 678, 686, 692, 694, 698,
- 700, 702, 708, 711, 718, 720, 725, 728, 733, 735,
- 737, 739, 747, 753, 755, 757, 759, 765, 771, 773,
- 775, 777, 779, 782, 787, 791, 794, 796, 798, 800,
- 803, 805, 808, 811, 814, 817, 821, 823, 826, 828,
- 832, 834, 836, 850, 856, 861, 865, 870, 871, 875,
- 878, 880, 889, 891, 896, 899, 903, 906, 910, 913,
- 916, 919, 923, 926, 930, 934, 936, 938, 940, 942,
- 944, 946, 948, 956, 958, 959, 962, 964, 967, 970,
- 979, 982, 985, 987, 991, 995, 1001, 1006, 1008, 1010,
- 1020, 1023, 1024, 1026, 1030, 1034, 1035, 1039, 1041, 1046,
- 1052, 1056, 1062, 1068, 1075, 1077, 1109, 1109, 1120, 1120,
- 1124, 1128, 1131, 1134, 1139, 1146, 1153, 1160, 1166, 1172,
- 1172, 1177, 1182, 1188, 1191, 1196, 1198, 1201, 1203, 1207,
- 1212, 1215, 1221, 1225, 1232, 1236, 1241, 1243, 1245, 1249,
- 1251, 1257, 1259, 1261, 1265, 1268, 1274, 1277, 1279, 1281,
- 1283, 1288, 1291
- };
-
- static const char * const yytname[] = { 0,
- "error","$illegal.","IDENTIFIER","TYPENAME","SCSPEC","TYPESPEC","TYPE_QUAL","CONSTANT","STRING","ELLIPSIS",
- "SIZEOF","ENUM","STRUCT","UNION","IF","ELSE","WHILE","DO","FOR","SWITCH",
- "CASE","DEFAULT","BREAK","CONTINUE","RETURN","GOTO","ASM","TYPEOF","ALIGNOF","ATTRIBUTE",
- "ASSIGN","'='","'?'","':'","OROR","ANDAND","'|'","'^'","'&'","EQCOMPARE",
- "ARITHCOMPARE","LSHIFT","RSHIFT","'+'","'-'","'*'","'/'","'%'","UNARY","PLUSPLUS",
- "MINUSMINUS","HYPERUNARY","POINTSAT","'.'","'('","'['","')'","';'","'}'","'~'",
- "'!'","','","'{'","']'","program"
- };
-
- static const short yyr1[] = { 0,
- 65, 65, 67, 66, 68, 66, 69, 69, 69, 70,
- 70, 70, 70, 70, 70, 70, 70, 72, 73, 71,
- 71, 74, 75, 71, 71, 76, 77, 71, 71, 78,
- 78, 79, 79, 79, 79, 79, 79, 79, 80, 81,
- 81, 82, 82, 83, 83, 83, 83, 83, 83, 83,
- 84, 84, 84, 85, 85, 85, 85, 85, 85, 85,
- 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
- 85, 86, 86, 86, 86, 86, 87, 86, 86, 86,
- 86, 86, 86, 86, 88, 88, 89, 89, 90, 90,
- 90, 90, 91, 92, 92, 92, 92, 93, 93, 94,
- 94, 94, 95, 95, 95, 95, 96, 96, 97, 97,
- 98, 98, 98, 98, 98, 99, 99, 99, 100, 100,
- 101, 101, 102, 102, 104, 103, 103, 106, 105, 105,
- 107, 107, 108, 108, 109, 109, 109, 110, 110, 110,
- 110, 110, 111, 111, 112, 112, 113, 113, 113, 113,
- 113, 113, 114, 114, 114, 114, 114, 115, 115, 115,
- 115, 115, 115, 117, 116, 116, 116, 118, 116, 116,
- 116, 119, 116, 120, 116, 116, 121, 121, 122, 122,
- 123, 123, 123, 124, 124, 124, 125, 125, 125, 126,
- 126, 126, 127, 127, 128, 128, 129, 129, 130, 130,
- 131, 131, 132, 132, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 134, 134, 134, 135, 135, 136, 137,
- 138, 138, 139, 139, 139, 139, 141, 140, 142, 142,
- 143, 142, 142, 144, 145, 142, 146, 147, 142, 148,
- 149, 150, 142, 151, 142, 152, 142, 153, 142, 142,
- 142, 142, 142, 142, 142, 142, 142, 142, 154, 142,
- 142, 155, 155, 156, 156, 157, 157, 158, 158, 159,
- 160, 160, 162, 161, 164, 163, 165, 165, 165, 166,
- 166, 167, 167, 167, 168, 168, 169, 169, 169, 169,
- 169, 170, 170
- };
-
- static const short yyr2[] = { 0,
- 0, 1, 0, 2, 0, 3, 1, 1, 5, 3,
- 4, 4, 2, 2, 2, 2, 1, 0, 0, 7,
- 4, 0, 0, 7, 4, 0, 0, 6, 3, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 1, 1, 3, 1, 2, 2, 2, 4, 2, 4,
- 1, 4, 7, 1, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 5, 3,
- 3, 1, 1, 1, 3, 3, 0, 4, 4, 4,
- 3, 3, 2, 2, 1, 2, 0, 1, 1, 1,
- 2, 2, 0, 4, 4, 2, 2, 2, 3, 0,
- 2, 2, 1, 1, 2, 2, 2, 3, 0, 2,
- 1, 1, 1, 4, 4, 1, 1, 1, 1, 3,
- 1, 3, 0, 4, 0, 6, 3, 0, 6, 3,
- 0, 6, 1, 3, 1, 4, 4, 1, 2, 3,
- 4, 1, 1, 3, 1, 1, 3, 3, 4, 3,
- 3, 1, 3, 4, 3, 3, 1, 3, 3, 3,
- 4, 3, 1, 0, 6, 4, 2, 0, 6, 4,
- 2, 0, 7, 0, 6, 2, 0, 1, 0, 1,
- 0, 3, 2, 3, 3, 1, 0, 1, 3, 2,
- 4, 2, 1, 3, 1, 3, 2, 2, 0, 1,
- 1, 2, 0, 2, 3, 3, 2, 3, 4, 3,
- 2, 3, 2, 1, 2, 2, 0, 1, 2, 0,
- 1, 2, 2, 5, 4, 4, 0, 6, 1, 2,
- 0, 4, 1, 0, 0, 7, 0, 0, 9, 0,
- 0, 0, 12, 0, 6, 0, 5, 0, 4, 2,
- 2, 2, 3, 6, 8, 10, 12, 3, 0, 4,
- 1, 0, 1, 0, 1, 0, 1, 1, 3, 4,
- 1, 3, 0, 2, 0, 2, 2, 2, 2, 2,
- 2, 0, 1, 3, 1, 3, 2, 2, 2, 2,
- 2, 1, 3
- };
-
- static const short yydefact[] = { 3,
- 5, 0, 0, 0, 113, 104, 111, 103, 0, 0,
- 0, 0, 0, 17, 4, 8, 7, 0, 93, 93,
- 100, 112, 6, 15, 16, 30, 31, 174, 176, 181,
- 167, 181, 171, 0, 0, 163, 203, 0, 0, 121,
- 0, 14, 0, 106, 105, 13, 0, 100, 98, 0,
- 172, 0, 164, 0, 168, 85, 0, 72, 201, 73,
- 0, 0, 32, 34, 33, 0, 35, 36, 0, 37,
- 38, 0, 0, 39, 51, 54, 42, 44, 74, 199,
- 109, 0, 199, 0, 0, 10, 0, 29, 0, 275,
- 0, 0, 131, 152, 203, 0, 0, 119, 0, 145,
- 146, 0, 0, 99, 102, 116, 117, 101, 118, 195,
- 179, 193, 0, 186, 183, 166, 93, 0, 93, 181,
- 170, 181, 86, 0, 0, 47, 0, 49, 45, 0,
- 0, 0, 0, 46, 114, 0, 0, 0, 264, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 83, 84, 0, 0, 40, 0, 203,
- 273, 0, 197, 200, 107, 115, 202, 109, 198, 204,
- 160, 159, 122, 123, 0, 158, 0, 162, 0, 0,
- 27, 88, 0, 93, 93, 90, 0, 130, 0, 0,
- 12, 0, 21, 0, 131, 275, 0, 11, 25, 0,
- 0, 180, 0, 179, 187, 182, 187, 0, 0, 9,
- 0, 0, 76, 75, 220, 0, 0, 43, 71, 70,
- 265, 0, 68, 67, 65, 66, 64, 63, 62, 60,
- 61, 55, 56, 57, 58, 59, 82, 81, 0, 41,
- 0, 207, 0, 211, 0, 213, 0, 273, 0, 110,
- 108, 0, 0, 292, 199, 199, 276, 0, 283, 285,
- 0, 161, 219, 0, 91, 92, 96, 0, 97, 0,
- 0, 128, 151, 147, 120, 19, 127, 148, 150, 0,
- 23, 196, 194, 175, 0, 0, 131, 184, 188, 185,
- 165, 169, 48, 50, 223, 0, 78, 0, 52, 0,
- 79, 80, 206, 205, 0, 274, 0, 212, 208, 210,
- 0, 124, 279, 157, 203, 273, 287, 288, 289, 203,
- 290, 291, 277, 0, 278, 0, 0, 28, 221, 0,
- 0, 123, 0, 0, 0, 125, 149, 0, 173, 192,
- 0, 190, 0, 0, 72, 113, 0, 234, 237, 0,
- 0, 0, 0, 0, 0, 0, 0, 262, 261, 0,
- 0, 217, 0, 229, 233, 214, 142, 0, 138, 143,
- 177, 69, 281, 280, 209, 207, 275, 0, 207, 284,
- 286, 293, 222, 94, 95, 135, 0, 133, 129, 20,
- 0, 24, 131, 189, 225, 0, 0, 0, 264, 0,
- 0, 248, 250, 251, 252, 0, 0, 263, 0, 259,
- 230, 0, 0, 226, 216, 215, 231, 139, 0, 0,
- 0, 156, 153, 155, 0, 0, 0, 0, 126, 191,
- 0, 0, 0, 0, 0, 246, 0, 253, 258, 0,
- 0, 224, 0, 140, 0, 144, 53, 154, 0, 0,
- 132, 134, 227, 0, 238, 240, 244, 0, 249, 0,
- 260, 232, 141, 136, 137, 0, 235, 0, 264, 0,
- 247, 266, 0, 228, 0, 0, 0, 245, 0, 0,
- 267, 268, 254, 236, 0, 241, 0, 266, 0, 0,
- 0, 264, 0, 0, 255, 269, 239, 0, 270, 0,
- 0, 242, 271, 0, 256, 0, 0, 0, 243, 257,
- 272, 0, 0, 0
- };
-
- static const short yydefgoto[] = { 512,
- 1, 2, 3, 15, 16, 17, 194, 335, 200, 338,
- 92, 264, 360, 72, 361, 239, 74, 75, 76, 77,
- 78, 132, 79, 181, 182, 18, 183, 184, 49, 185,
- 80, 165, 21, 108, 97, 39, 93, 98, 391, 40,
- 334, 188, 387, 388, 370, 371, 174, 100, 317, 101,
- 22, 120, 122, 113, 50, 421, 203, 52, 118, 288,
- 289, 111, 112, 82, 163, 83, 84, 164, 363, 413,
- 186, 296, 328, 364, 365, 466, 366, 443, 397, 475,
- 398, 468, 469, 492, 506, 470, 458, 437, 441, 409,
- 222, 480, 481, 482, 504, 244, 245, 176, 177, 257,
- 306, 258, 259, 260, 261
- };
-
- static const short yypact[] = { 53,
- 61, 1402, 1402, 84,-32768,-32768,-32768,-32768, 36, 39,
- 42, 48, 54,-32768,-32768,-32768,-32768, 108, 7, 133,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 33,-32768,
- 68,-32768, 86, 149, 1196,-32768,-32768, 108, 175,-32768,
- 375,-32768, 240,-32768,-32768,-32768, 108,-32768, 636, 253,
- -32768, 838,-32768, 842,-32768,-32768, 41,-32768,-32768,-32768,
- 1263, 1276,-32768,-32768,-32768, 1330,-32768,-32768, 276,-32768,
- -32768, 1330, 117, 118,-32768,-32768, 1464, 899, 178, 22,
- -32768, 177, 340, 303, 318,-32768, 240,-32768, 181,-32768,
- 252, 515, 217,-32768,-32768, 240, 184,-32768, 881, 245,
- 269, 190, 730, 636,-32768,-32768,-32768,-32768,-32768, 230,
- 206,-32768, 253,-32768,-32768,-32768,-32768, 214, 632,-32768,
- -32768,-32768,-32768, 234, 276,-32768, 276,-32768,-32768, 221,
- 237, 251, 281,-32768,-32768, 1330, 1330, 1330, 1330, 1330,
- 1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330,
- 1330, 1330, 1330,-32768,-32768, 253, 253, 1330, 1330,-32768,
- 22, 896,-32768, 322, 358,-32768,-32768,-32768,-32768,-32768,
- 269,-32768,-32768, 323, 149,-32768, 698,-32768, 297, 325,
- -32768, 575, 486, 326, 1284,-32768, 335, 365, 45, 337,
- -32768, 240,-32768, 515, 217,-32768, 919,-32768,-32768, 515,
- 1330, 253, 353, 206, 314,-32768, 314, 1339, 1343,-32768,
- 347, 362,-32768,-32768, 363, 367, 1135, 1464, 1464, 1464,
- -32768, 395, 1398, 1492, 1503, 1513, 438, 873, 817, 719,
- 719, 380, 380,-32768,-32768,-32768,-32768,-32768, 382, 118,
- 376, 220, 389,-32768, 328,-32768, 378,-32768, 964,-32768,
- 358, 47, 390,-32768, 218, 1419,-32768, 392, 388,-32768,
- 9,-32768,-32768, 26,-32768,-32768,-32768, 240,-32768, 108,
- 397,-32768, 245,-32768,-32768,-32768, 421,-32768,-32768, 391,
- -32768, 1464,-32768,-32768, 401, 1330, 235, 399,-32768, 399,
- -32768,-32768,-32768,-32768,-32768, 547,-32768, 829,-32768, 1330,
- -32768,-32768, 322,-32768, 407,-32768, 408,-32768,-32768,-32768,
- 405,-32768,-32768,-32768,-32768, 122, 345, 269,-32768,-32768,
- 269,-32768,-32768, 404,-32768, 465, 251,-32768,-32768, 192,
- 209, 27, 467, 829, 26,-32768,-32768, 26,-32768, 1464,
- 1330,-32768, 314, 250, 442, 454, 441,-32768,-32768, 462,
- 463, 1330, 489, 466, 468, 1209, 253, 526,-32768, 500,
- 477, 1049, 608,-32768, 522,-32768,-32768, 412, 1464,-32768,
- 478, 1480,-32768,-32768,-32768, 110,-32768, 987, 77,-32768,
- -32768,-32768,-32768,-32768,-32768, 484, 31,-32768,-32768,-32768,
- 829,-32768, 1446,-32768,-32768, 1330, 487, 1110, 1330, 1330,
- 523,-32768,-32768,-32768,-32768, 505, 519,-32768, 528,-32768,
- -32768, 669, 525,-32768,-32768,-32768,-32768,-32768, 120, 745,
- 531, 345,-32768,-32768, 521, 152, 537, 467,-32768,-32768,
- 538, 1330, 579, 541, 543,-32768, 1110,-32768,-32768, 149,
- 1110,-32768, 1110,-32768, 768,-32768,-32768,-32768, 544, 105,
- -32768,-32768,-32768, 549,-32768,-32768,-32768, 1110,-32768, 236,
- -32768,-32768,-32768,-32768,-32768, 1110,-32768, 558, 1330, 1110,
- -32768, 595, 556,-32768, 1110, 1330, 557,-32768, 563, 13,
- 559,-32768,-32768,-32768, 565,-32768, 1330, 595, 562, 595,
- 566, 1330, 583, 17,-32768,-32768,-32768, 594,-32768, 149,
- 597,-32768, 178, 114,-32768, 1110, 598, 149,-32768,-32768,
- 178, 657, 661,-32768
- };
-
- static const short yypgoto[] = {-32768,
- -32768,-32768,-32768, 659,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768,-32768, -6,-32768, -33,-32768, 506, 373, -47, 57,
- -32768,-32768, -34, -131, 369, 40, -145, 4, 626, 6,
- -19, 507, 3, -139, 411, -30, -77, -72,-32768,-32768,
- -32768, -179,-32768, 248, -310, 313, -32, -62, 306, -17,
- -31,-32768,-32768,-32768,-32768,-32768, 479, -4,-32768, 490,
- 342, 587, 504, -40, -70, 10, -85, -147, 354,-32768,
- -171,-32768, -107, -112,-32768,-32768, -322,-32768,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -368, 219,-32768, 227,-32768, 461,-32768, -164,-32768,-32768,
- -32768, 473,-32768, 398, 295
- };
-
-
- #define YYLAST 1561
-
-
- static const short yytable[] = { 57,
- 41, 73, 29, 31, 33, 19, 19, 20, 20, 189,
- 99, 266, 169, 243, 173, 277, 102, 109, 129, 216,
- 85, 195, 48, 389, 134, 250, 327, 54, 133, 103,
- 434, 278, 117, 190, 117, 131, 265, 81, 26, 27,
- 416, 26, 27, 110, 26, 27, 488, 36, 94, 123,
- 500, 170, -1, 89, 81, 123, 81, 179, 43, 47,
- -2, 119, 276, 119, 42, 325, 171, 160, 281, 489,
- 326, 81, 109, 501, 242, 433, 161, 162, 85, 36,
- 429, 90, 91, 170, 211, 168, 212, 427, 215, 416,
- 95, 131, 428, 131, 303, 51, 195, 124, 28, 96,
- 477, 30, 34, 312, 32, 221, 110, 342, 35, 446,
- 36, 250, 36, 314, 459, 208, 170, 209, 461, 275,
- 462, 168, 320, 498, 36, 241, 273, 81, 247, 81,
- 53, 316, 162, 109, 446, 471, 5, 44, 7, 45,
- 252, 24, 25, 474, 9, 10, 11, 478, 55, 237,
- 238, 329, 484, 37, 254, 315, 205, 56, 207, 449,
- 13, 465, 38, 280, 316, 162, 326, 320, 243, 299,
- 507, 171, 287, 135, 287, 508, 316, 162, 444, 136,
- 255, 445, 256, 509, 319, 322, 123, 48, 117, 117,
- 46, 415, 218, 219, 220, 110, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 81, 81, 423, 430, 383, 311, 265, 119, 119, 109,
- 36, 314, 329, 268, 270, 329, 170, 390, 303, 376,
- 392, 303, 86, 166, 379, 175, 87, 318, 321, 331,
- 415, 191, 36, 94, 123, 192, 187, 198, 255, 384,
- 256, 87, 332, 192, 58, 26, 27, 282, 48, 60,
- 56, 201, 61, 315, 187, 160, 385, 202, 341, 472,
- 87, 206, 316, 162, 161, 162, 130, 213, 58, 5,
- 62, 7, 59, 60, 56, 95, 61, 9, 10, 11,
- 63, 210, 473, 214, 96, 64, 65, 66, 85, 196,
- 197, 67, 68, 13, 62, 36, 69, 263, 395, 170,
- 287, 70, 71, 215, 63, 178, 36, 94, 401, 64,
- 65, 66, 406, 90, 91, 67, 68, 255, 305, 256,
- 69, 5, 6, 7, 8, 70, 71, 217, -77, 9,
- 10, 11, 340, 5, 425, 7, 167, 286, 37, 89,
- 407, 9, 10, 11, 369, 13, 372, 38, 171, 95,
- 262, 171, 431, 106, 107, 221, 435, 13, 96, 9,
- 10, 11, 90, 91, 172, 88, 248, 249, -26, -26,
- -26, -26, 263, 267, -282, 160, -26, -26, -26, 271,
- 369, 196, 197, 274, 161, 162, 272, 393, 454, 377,
- 378, 89, -26, 293, -123, 460, -123, 5, 6, 7,
- 8, 284, 367, 380, 58, 9, 10, 11, 294, 60,
- 56, 295, 61, 297, 369, 151, 152, 153, 300, 90,
- 91, 13, -123, 126, 128, 221, -123, -26, 301, 302,
- 62, 308, 485, 248, 249, 304, 313, 369, 323, 324,
- 63, 333, 336, 493, 337, 64, 65, 66, 221, 339,
- 343, 67, 68, 373, 374, 503, 69, 382, 375, 386,
- 418, 70, 71, 511, 368, -30, 369, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 180, -31, -89, -89,
- -89, -89, -89, -89, -89, 396, -89, -89, -89, -89,
- -89, 369, -89, -89, -89, -89, -89, -89, -89, -89,
- -89, -89, -89, -89, -89, 180, 399, 400, 5, 6,
- 7, 8, 402, 403, -89, 404, 9, 10, 11, -89,
- -89, -89, 408, 410, 411, -89, -89, 417, 426, 420,
- -89, 432, 13, -89, -89, -89, -89, 344, -89, 345,
- 346, 6, 7, 8, 60, 56, 436, 61, 9, 10,
- 11, 347, 438, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, 357, 358, 13, 62, 439, -87, 5, 6,
- 7, 8, 440, 442, 448, 63, 9, 10, 11, 447,
- 64, 65, 66, 451, 453, 455, 67, 68, 456, 457,
- 464, 69, 13, 479, 359, 467, 70, 71, 180, 215,
- 345, 27, 476, 483, 486, 60, 56, 487, 61, 495,
- 490, 491, 347, 497, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 5, 62, 7, 167, 499,
- 105, 106, 107, 9, 10, 11, 63, 9, 10, 11,
- 502, 64, 65, 66, 505, 510, 513, 67, 68, 13,
- 514, 23, 69, 240, 362, 359, 414, 70, 71, 180,
- 215, 345, 27, 104, 251, 452, 60, 56, 330, 61,
- 419, 422, 285, 347, 394, 348, 349, 350, 351, 352,
- 353, 354, 355, 356, 357, 358, 290, 62, 253, 204,
- 254, 5, 6, 7, 8, 283, 494, 63, 309, 9,
- 10, 11, 64, 65, 66, 412, 496, 307, 67, 68,
- 450, 381, 0, 69, 0, 13, 359, -218, 70, 71,
- 199, 215, 0, -22, -22, -22, -22, 0, 0, 0,
- 0, -22, -22, -22, 0, 367, 0, 58, 0, 0,
- 0, 0, 60, 56, -282, 61, 89, -22, 0, -123,
- 0, -123, 149, 150, 151, 152, 153, 0, 367, 0,
- 58, 0, 0, 62, 0, 60, 56, 0, 61, 0,
- 0, 0, 0, 63, 90, 91, 0, -123, 64, 65,
- 66, -123, -22, 0, 67, 68, 62, 0, 0, 69,
- 0, 0, 0, -178, 70, 71, 63, 368, 0, 0,
- 0, 64, 65, 66, 0, 0, 0, 67, 68, 0,
- 0, 0, 69, 0, 0, 0, 463, 70, 71, 367,
- 368, 58, 0, 0, 0, 0, 60, 56, 114, 61,
- 0, 5, 114, 7, 59, 5, 0, 7, 59, 9,
- 10, 11, 0, 9, 10, 11, 0, 62, 147, 148,
- 149, 150, 151, 152, 153, 13, 0, 63, 0, 13,
- 0, 0, 64, 65, 66, 0, 0, 0, 67, 68,
- 0, 193, 0, 69, -18, -18, -18, -18, 70, 71,
- 0, 368, -18, -18, -18, 115, 116, 0, 58, 115,
- 121, 0, 0, 60, 56, 0, 61, 89, -18, 0,
- -123, 0, -123, 146, 147, 148, 149, 150, 151, 152,
- 153, 58, 0, 0, 62, 0, 60, 56, 0, 61,
- 0, 0, 0, 0, 63, 0, 0, 0, -123, 64,
- 65, 66, -123, -18, 0, 67, 68, 62, 154, 155,
- 69, 156, 157, 158, 159, 70, 71, 63, 0, 246,
- 0, 0, 64, 65, 66, 0, 58, 0, 67, 68,
- 0, 60, 56, 69, 61, 0, 0, 0, 70, 71,
- 0, 0, 279, 0, 0, 0, 0, 0, 0, 58,
- 0, 0, 62, 0, 60, 56, 0, 61, 0, 0,
- 0, 0, 63, 0, 0, 0, 0, 64, 65, 66,
- 0, 0, 0, 67, 68, 62, 0, 0, 69, 0,
- 0, 0, 0, 70, 71, 63, 0, 310, 0, 0,
- 64, 65, 66, 0, 0, 0, 67, 68, 0, 0,
- 0, 69, 0, 0, 0, 0, 70, 71, 0, 0,
- 424, 345, 346, 6, 7, 8, 60, 56, 0, 61,
- 9, 10, 11, 347, 0, 348, 349, 350, 351, 352,
- 353, 354, 355, 356, 357, 358, 13, 62, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,
- 0, 0, 64, 65, 66, 0, 0, 0, 67, 68,
- 0, 0, 0, 69, 0, 0, 359, 0, 70, 71,
- 0, 215, 345, 27, 0, 0, 0, 60, 56, 0,
- 61, 0, 0, 0, 347, 0, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, 358, 58, 62, 0,
- 0, 0, 60, 56, 0, 61, 0, 0, 63, 0,
- 0, 0, 0, 64, 65, 66, 0, 0, 0, 67,
- 68, 0, 0, 62, 69, 0, 0, 359, 0, 70,
- 71, 0, 215, 63, 0, 0, 0, 0, 64, 65,
- 66, 0, 0, 0, 67, 68, 0, 0, 0, 69,
- 0, 0, 0, 0, 70, 71, 0, 298, 58, 5,
- 0, 7, 59, 60, 56, 0, 61, 9, 10, 11,
- 0, 58, 0, 0, 0, 0, 60, 56, 0, 61,
- 0, 0, 0, 13, 62, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63, 0, 0, 62, 0, 64,
- 65, 66, 0, 0, 0, 67, 68, 63, 0, 0,
- 69, 0, 64, 65, 66, 70, 71, 0, 67, 68,
- 0, 0, 0, 69, 0, 58, 405, 0, 70, 71,
- 60, 56, 0, 61, 0, 0, 0, 0, 58, 0,
- 0, 0, 0, 60, 56, 0, 61, 5, 44, 7,
- 45, 62, 0, 0, 0, 9, 10, 11, 0, 0,
- 0, 63, 0, 0, 62, 0, 64, 65, 66, 0,
- 0, 13, 67, 68, 63, 0, 0, 125, 0, 64,
- 65, 66, 70, 71, 0, 67, 68, 0, 0, 0,
- 127, 0, 58, 0, 0, 70, 71, 60, 56, 114,
- 61, 269, 5, 114, 7, 59, 5, 0, 7, 59,
- 9, 10, 11, 0, 9, 10, 11, 0, 62, 0,
- 0, 0, 0, 0, 0, 0, 13, 0, 63, 0,
- 13, 0, 0, 64, 65, 66, 0, 0, 0, 67,
- 68, 0, 0, 0, 69, 0, 0, 0, 0, 70,
- 71, 0, 0, 0, 0, 0, 115, 291, 0, 0,
- 115, 292, 4, 0, -93, 5, 6, 7, 8, 0,
- 0, 0, 0, 9, 10, 11, 0, 0, 0, 0,
- 0, 36, 5, 44, 7, 45, 0, 0, 12, 13,
- 9, 10, 11, 141, 142, 143, 144, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 13, -93, 0, 0,
- 0, 0, 0, 0, 0, 0, -93, 0, 0, 14,
- 0, 0, 0, 0, 320, 0, 0, 0, 0, 0,
- 0, 0, 0, 316, 162, 187, 137, 138, 139, 0,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151, 152, 153, 137, 138, 139, 0, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 139, 0, 140, 141, 142, 143, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
- 153, 144, 145, 146, 147, 148, 149, 150, 151, 152,
- 153
- };
-
- static const short yycheck[] = { 34,
- 18, 35, 9, 10, 11, 2, 3, 2, 3, 95,
- 43, 183, 83, 161, 87, 195, 47, 49, 66, 132,
- 38, 99, 20, 334, 72, 165, 1, 32, 69, 47,
- 399, 196, 52, 96, 54, 69, 182, 35, 3, 4,
- 363, 3, 4, 50, 3, 4, 34, 3, 4, 9,
- 34, 7, 0, 27, 52, 9, 54, 91, 19, 20,
- 0, 52, 194, 54, 58, 57, 84, 46, 200, 57,
- 62, 69, 104, 57, 160, 398, 55, 56, 96, 3,
- 391, 55, 56, 7, 125, 83, 127, 57, 63, 412,
- 46, 125, 62, 127, 242, 63, 174, 57, 63, 55,
- 469, 63, 55, 57, 63, 139, 113, 287, 55, 420,
- 3, 251, 3, 4, 437, 120, 7, 122, 441, 192,
- 443, 119, 46, 492, 3, 159, 189, 125, 162, 127,
- 63, 55, 56, 165, 445, 458, 4, 5, 6, 7,
- 175, 58, 59, 466, 12, 13, 14, 470, 63, 156,
- 157, 264, 475, 46, 3, 46, 117, 9, 119, 8,
- 28, 57, 55, 197, 55, 56, 62, 46, 316, 217,
- 57, 189, 205, 57, 207, 62, 55, 56, 59, 62,
- 177, 62, 177, 506, 255, 256, 9, 185, 208, 209,
- 58, 363, 136, 137, 138, 202, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 208, 209, 377, 393, 327, 249, 362, 208, 209, 251,
- 3, 4, 335, 184, 185, 338, 7, 335, 376, 315,
- 338, 379, 58, 57, 320, 55, 62, 255, 256, 270,
- 412, 58, 3, 4, 9, 62, 30, 58, 245, 58,
- 245, 62, 270, 62, 3, 3, 4, 201, 256, 8,
- 9, 32, 11, 46, 30, 46, 58, 62, 34, 34,
- 62, 58, 55, 56, 55, 56, 1, 57, 3, 4,
- 29, 6, 7, 8, 9, 46, 11, 12, 13, 14,
- 39, 58, 57, 57, 55, 44, 45, 46, 316, 55,
- 56, 50, 51, 28, 29, 3, 55, 58, 59, 7,
- 343, 60, 61, 63, 39, 64, 3, 4, 352, 44,
- 45, 46, 356, 55, 56, 50, 51, 324, 1, 324,
- 55, 4, 5, 6, 7, 60, 61, 57, 63, 12,
- 13, 14, 286, 4, 378, 6, 7, 34, 46, 27,
- 357, 12, 13, 14, 298, 28, 300, 55, 376, 46,
- 64, 379, 396, 6, 7, 399, 400, 28, 55, 12,
- 13, 14, 55, 56, 57, 1, 55, 56, 4, 5,
- 6, 7, 58, 58, 57, 46, 12, 13, 14, 55,
- 334, 55, 56, 57, 55, 56, 32, 341, 432, 55,
- 56, 27, 28, 57, 30, 440, 32, 4, 5, 6,
- 7, 59, 1, 10, 3, 12, 13, 14, 57, 8,
- 9, 59, 11, 57, 368, 46, 47, 48, 34, 55,
- 56, 28, 58, 61, 62, 469, 62, 63, 57, 64,
- 29, 64, 476, 55, 56, 57, 57, 391, 57, 62,
- 39, 55, 32, 487, 64, 44, 45, 46, 492, 59,
- 62, 50, 51, 57, 57, 500, 55, 3, 64, 3,
- 59, 60, 61, 508, 63, 34, 420, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 1, 34, 3, 4,
- 5, 6, 7, 8, 9, 55, 11, 12, 13, 14,
- 15, 445, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 1, 55, 55, 4, 5,
- 6, 7, 34, 58, 39, 58, 12, 13, 14, 44,
- 45, 46, 7, 34, 58, 50, 51, 16, 55, 62,
- 55, 55, 28, 58, 59, 60, 61, 1, 63, 3,
- 4, 5, 6, 7, 8, 9, 34, 11, 12, 13,
- 14, 15, 58, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 58, 63, 4, 5,
- 6, 7, 55, 59, 64, 39, 12, 13, 14, 59,
- 44, 45, 46, 57, 57, 17, 50, 51, 58, 57,
- 57, 55, 28, 9, 58, 57, 60, 61, 1, 63,
- 3, 4, 55, 58, 58, 8, 9, 55, 11, 58,
- 62, 57, 15, 58, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 4, 29, 6, 7, 57,
- 5, 6, 7, 12, 13, 14, 39, 12, 13, 14,
- 57, 44, 45, 46, 58, 58, 0, 50, 51, 28,
- 0, 3, 55, 158, 296, 58, 59, 60, 61, 1,
- 63, 3, 4, 48, 168, 428, 8, 9, 268, 11,
- 368, 376, 204, 15, 343, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 207, 29, 1, 113,
- 3, 4, 5, 6, 7, 202, 488, 39, 248, 12,
- 13, 14, 44, 45, 46, 362, 490, 245, 50, 51,
- 426, 324, -1, 55, -1, 28, 58, 59, 60, 61,
- 1, 63, -1, 4, 5, 6, 7, -1, -1, -1,
- -1, 12, 13, 14, -1, 1, -1, 3, -1, -1,
- -1, -1, 8, 9, 57, 11, 27, 28, -1, 30,
- -1, 32, 44, 45, 46, 47, 48, -1, 1, -1,
- 3, -1, -1, 29, -1, 8, 9, -1, 11, -1,
- -1, -1, -1, 39, 55, 56, -1, 58, 44, 45,
- 46, 62, 63, -1, 50, 51, 29, -1, -1, 55,
- -1, -1, -1, 59, 60, 61, 39, 63, -1, -1,
- -1, 44, 45, 46, -1, -1, -1, 50, 51, -1,
- -1, -1, 55, -1, -1, -1, 59, 60, 61, 1,
- 63, 3, -1, -1, -1, -1, 8, 9, 1, 11,
- -1, 4, 1, 6, 7, 4, -1, 6, 7, 12,
- 13, 14, -1, 12, 13, 14, -1, 29, 42, 43,
- 44, 45, 46, 47, 48, 28, -1, 39, -1, 28,
- -1, -1, 44, 45, 46, -1, -1, -1, 50, 51,
- -1, 1, -1, 55, 4, 5, 6, 7, 60, 61,
- -1, 63, 12, 13, 14, 58, 59, -1, 3, 58,
- 59, -1, -1, 8, 9, -1, 11, 27, 28, -1,
- 30, -1, 32, 41, 42, 43, 44, 45, 46, 47,
- 48, 3, -1, -1, 29, -1, 8, 9, -1, 11,
- -1, -1, -1, -1, 39, -1, -1, -1, 58, 44,
- 45, 46, 62, 63, -1, 50, 51, 29, 50, 51,
- 55, 53, 54, 55, 56, 60, 61, 39, -1, 64,
- -1, -1, 44, 45, 46, -1, 3, -1, 50, 51,
- -1, 8, 9, 55, 11, -1, -1, -1, 60, 61,
- -1, -1, 64, -1, -1, -1, -1, -1, -1, 3,
- -1, -1, 29, -1, 8, 9, -1, 11, -1, -1,
- -1, -1, 39, -1, -1, -1, -1, 44, 45, 46,
- -1, -1, -1, 50, 51, 29, -1, -1, 55, -1,
- -1, -1, -1, 60, 61, 39, -1, 64, -1, -1,
- 44, 45, 46, -1, -1, -1, 50, 51, -1, -1,
- -1, 55, -1, -1, -1, -1, 60, 61, -1, -1,
- 64, 3, 4, 5, 6, 7, 8, 9, -1, 11,
- 12, 13, 14, 15, -1, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 39, -1, -1,
- -1, -1, 44, 45, 46, -1, -1, -1, 50, 51,
- -1, -1, -1, 55, -1, -1, 58, -1, 60, 61,
- -1, 63, 3, 4, -1, -1, -1, 8, 9, -1,
- 11, -1, -1, -1, 15, -1, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 3, 29, -1,
- -1, -1, 8, 9, -1, 11, -1, -1, 39, -1,
- -1, -1, -1, 44, 45, 46, -1, -1, -1, 50,
- 51, -1, -1, 29, 55, -1, -1, 58, -1, 60,
- 61, -1, 63, 39, -1, -1, -1, -1, 44, 45,
- 46, -1, -1, -1, 50, 51, -1, -1, -1, 55,
- -1, -1, -1, -1, 60, 61, -1, 63, 3, 4,
- -1, 6, 7, 8, 9, -1, 11, 12, 13, 14,
- -1, 3, -1, -1, -1, -1, 8, 9, -1, 11,
- -1, -1, -1, 28, 29, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 39, -1, -1, 29, -1, 44,
- 45, 46, -1, -1, -1, 50, 51, 39, -1, -1,
- 55, -1, 44, 45, 46, 60, 61, -1, 50, 51,
- -1, -1, -1, 55, -1, 3, 58, -1, 60, 61,
- 8, 9, -1, 11, -1, -1, -1, -1, 3, -1,
- -1, -1, -1, 8, 9, -1, 11, 4, 5, 6,
- 7, 29, -1, -1, -1, 12, 13, 14, -1, -1,
- -1, 39, -1, -1, 29, -1, 44, 45, 46, -1,
- -1, 28, 50, 51, 39, -1, -1, 55, -1, 44,
- 45, 46, 60, 61, -1, 50, 51, -1, -1, -1,
- 55, -1, 3, -1, -1, 60, 61, 8, 9, 1,
- 11, 58, 4, 1, 6, 7, 4, -1, 6, 7,
- 12, 13, 14, -1, 12, 13, 14, -1, 29, -1,
- -1, -1, -1, -1, -1, -1, 28, -1, 39, -1,
- 28, -1, -1, 44, 45, 46, -1, -1, -1, 50,
- 51, -1, -1, -1, 55, -1, -1, -1, -1, 60,
- 61, -1, -1, -1, -1, -1, 58, 59, -1, -1,
- 58, 59, 1, -1, 3, 4, 5, 6, 7, -1,
- -1, -1, -1, 12, 13, 14, -1, -1, -1, -1,
- -1, 3, 4, 5, 6, 7, -1, -1, 27, 28,
- 12, 13, 14, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 28, 46, -1, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, 58,
- -1, -1, -1, -1, 46, -1, -1, -1, -1, -1,
- -1, -1, -1, 55, 56, 30, 31, 32, 33, -1,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 31, 32, 33, -1, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 33, -1, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48
- };
- #define YYPURE 1
-
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- #line 3 "bison.simple"
-
- /* Skeleton output parser for bison,
- Copyright (C) 1984 Bob Corbett and Richard Stallman
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
- #include <alloca.h>
- #endif
-
- /* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
- /* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
- #define yyerrok (yyerrstatus = 0)
- #define yyclearin (yychar = YYEMPTY)
- #define YYEMPTY -2
- #define YYEOF 0
- #define YYFAIL goto yyerrlab;
- #define YYACCEPT return(0)
- #define YYABORT return(1)
- #define YYERROR goto yyerrlab
-
- #define YYTERROR 1
- #define YYERRCODE 256
-
- #ifndef YYIMPURE
- #define YYLEX yylex()
- #endif
-
- #ifndef YYPURE
- #define YYLEX yylex(&yylval, &yylloc)
- #endif
-
- /* If nonreentrant, generate the variables here */
-
- #ifndef YYIMPURE
-
- int yychar; /* the lookahead symbol */
- YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
- YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-
- int yynerrs; /* number of parse errors so far */
- #endif /* YYIMPURE */
-
- #if YYDEBUG != 0
- int yydebug; /* nonzero means print parse trace */
- /* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
- #endif
-
- /* YYMAXDEPTH indicates the initial size of the parser's stacks */
-
- #ifndef YYMAXDEPTH
- #define YYMAXDEPTH 200
- #endif
-
- /* YYMAXLIMIT is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
- #ifndef YYMAXLIMIT
- #define YYMAXLIMIT 10000
- #endif
-
-
- #line 90 "bison.simple"
- int
- yyparse()
- {
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYMAXDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYMAXDEPTH]; /* the semantic value stack */
- YYLTYPE yylsa[YYMAXDEPTH]; /* the location stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
- YYLTYPE *yyls = yylsa;
-
- int yymaxdepth = YYMAXDEPTH;
-
- #ifndef YYPURE
- int yychar;
- YYSTYPE yylval;
- YYLTYPE yylloc;
- int yynerrs;
- #endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
- #endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
- yylsp = yyls;
-
- /* Push a new state, which is found in yystate . */
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
- yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yymaxdepth - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- YYLTYPE *yyls1 = yyls;
- short *yyss1 = yyss;
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
- #ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yymaxdepth);
-
- yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
- #else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yymaxdepth >= YYMAXLIMIT)
- yyerror("parser stack overflow");
- yymaxdepth *= 2;
- if (yymaxdepth > YYMAXLIMIT)
- yymaxdepth = YYMAXLIMIT;
- yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
- bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
- bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
- #ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
- bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
- #endif
- #endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
- #ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
- #endif
-
- if (yyssp >= yyss + yymaxdepth - 1)
- YYABORT;
- }
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
- #endif
-
- /* Do appropriate processing given the current state. */
- /* Read a lookahead token if we need one and don't already have one. */
- yyresume:
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
- #endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
- #endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
- #endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
- #endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
- #ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
- #endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
- /* Do the default action for the current state. */
- yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
- /* Do a reduction. yyn is the number of a rule to reduce with. */
- yyreduce:
- yylen = yyr2[yyn];
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- if (yylen == 1)
- fprintf (stderr, "Reducing 1 value via line %d, ",
- yyrline[yyn]);
- else
- fprintf (stderr, "Reducing %d values via line %d, ",
- yylen, yyrline[yyn]);
- }
- #endif
-
-
- switch (yyn) {
-
- case 3:
- #line 185 "../gcc-1.37/c-parse.y"
- {yyval.ttype = NULL_TREE; ;
- break;}
- case 5:
- #line 186 "../gcc-1.37/c-parse.y"
- {yyval.ttype = NULL_TREE; ;
- break;}
- case 9:
- #line 193 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("ANSI C forbids use of `asm' keyword");
- if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype);
- assemble_asm (yyvsp[-2].ttype); ;
- break;}
- case 10:
- #line 201 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- error ("ANSI C forbids data definition lacking type or storage class");
- else if (!flag_traditional)
- warning ("data definition lacks type or storage class"); ;
- break;}
- case 11:
- #line 206 "../gcc-1.37/c-parse.y"
- {;
- break;}
- case 12:
- #line 208 "../gcc-1.37/c-parse.y"
- {;
- break;}
- case 13:
- #line 210 "../gcc-1.37/c-parse.y"
- { error ("empty declaration"); ;
- break;}
- case 14:
- #line 212 "../gcc-1.37/c-parse.y"
- { shadow_tag (yyvsp[-1].ttype); ;
- break;}
- case 17:
- #line 216 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("ANSI C does not allow extra `;' outside of a function"); ;
- break;}
- case 18:
- #line 222 "../gcc-1.37/c-parse.y"
- { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
- YYERROR;
- reinit_parse_for_function (); ;
- break;}
- case 19:
- #line 226 "../gcc-1.37/c-parse.y"
- { store_parm_decls (); ;
- break;}
- case 20:
- #line 228 "../gcc-1.37/c-parse.y"
- { finish_function (lineno); ;
- break;}
- case 21:
- #line 230 "../gcc-1.37/c-parse.y"
- { ;
- break;}
- case 22:
- #line 232 "../gcc-1.37/c-parse.y"
- { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
- YYERROR;
- reinit_parse_for_function (); ;
- break;}
- case 23:
- #line 236 "../gcc-1.37/c-parse.y"
- { store_parm_decls (); ;
- break;}
- case 24:
- #line 238 "../gcc-1.37/c-parse.y"
- { finish_function (lineno); ;
- break;}
- case 25:
- #line 240 "../gcc-1.37/c-parse.y"
- { ;
- break;}
- case 26:
- #line 242 "../gcc-1.37/c-parse.y"
- { if (! start_function (0, yyvsp[0].ttype))
- YYERROR;
- reinit_parse_for_function (); ;
- break;}
- case 27:
- #line 246 "../gcc-1.37/c-parse.y"
- { store_parm_decls (); ;
- break;}
- case 28:
- #line 248 "../gcc-1.37/c-parse.y"
- { finish_function (lineno); ;
- break;}
- case 29:
- #line 250 "../gcc-1.37/c-parse.y"
- { ;
- break;}
- case 32:
- #line 259 "../gcc-1.37/c-parse.y"
- { yyval.code = ADDR_EXPR; ;
- break;}
- case 33:
- #line 261 "../gcc-1.37/c-parse.y"
- { yyval.code = NEGATE_EXPR; ;
- break;}
- case 34:
- #line 263 "../gcc-1.37/c-parse.y"
- { yyval.code = CONVERT_EXPR; ;
- break;}
- case 35:
- #line 265 "../gcc-1.37/c-parse.y"
- { yyval.code = PREINCREMENT_EXPR; ;
- break;}
- case 36:
- #line 267 "../gcc-1.37/c-parse.y"
- { yyval.code = PREDECREMENT_EXPR; ;
- break;}
- case 37:
- #line 269 "../gcc-1.37/c-parse.y"
- { yyval.code = BIT_NOT_EXPR; ;
- break;}
- case 38:
- #line 271 "../gcc-1.37/c-parse.y"
- { yyval.code = TRUTH_NOT_EXPR; ;
- break;}
- case 39:
- #line 275 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ;
- break;}
- case 40:
- #line 280 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 42:
- #line 286 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
- break;}
- case 43:
- #line 288 "../gcc-1.37/c-parse.y"
- { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
- break;}
- case 45:
- #line 294 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ;
- break;}
- case 46:
- #line 296 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ;
- break;}
- case 47:
- #line 298 "../gcc-1.37/c-parse.y"
- { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF
- && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1)))
- error ("`sizeof' applied to a bit-field");
- /* ANSI says arrays and functions are converted inside comma.
- But we can't really convert them in build_compound_expr
- because that would break commas in lvalues.
- So do the conversion here if operand was a comma. */
- if (TREE_CODE (yyvsp[0].ttype) == COMPOUND_EXPR
- && (TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == ARRAY_TYPE
- || TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == FUNCTION_TYPE))
- yyvsp[0].ttype = default_conversion (yyvsp[0].ttype);
- yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ;
- break;}
- case 48:
- #line 311 "../gcc-1.37/c-parse.y"
- { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ;
- break;}
- case 49:
- #line 313 "../gcc-1.37/c-parse.y"
- { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF
- && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1)))
- error ("`__alignof' applied to a bit-field");
- if (TREE_CODE (yyvsp[0].ttype) == INDIRECT_REF)
- {
- tree t = TREE_OPERAND (yyvsp[0].ttype, 0);
- tree best = t;
- int bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t)));
- while (TREE_CODE (t) == NOP_EXPR
- && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE)
- {
- int thisalign;
- t = TREE_OPERAND (t, 0);
- thisalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t)));
- if (thisalign > bestalign)
- best = t, bestalign = thisalign;
- }
- yyval.ttype = c_alignof (TREE_TYPE (TREE_TYPE (best)));
- }
- else
- {
- /* ANSI says arrays and fns are converted inside comma.
- But we can't convert them in build_compound_expr
- because that would break commas in lvalues.
- So do the conversion here if operand was a comma. */
- if (TREE_CODE (yyvsp[0].ttype) == COMPOUND_EXPR
- && (TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == ARRAY_TYPE
- || TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == FUNCTION_TYPE))
- yyvsp[0].ttype = default_conversion (yyvsp[0].ttype);
- yyval.ttype = c_alignof (TREE_TYPE (yyvsp[0].ttype));
- }
- ;
- break;}
- case 50:
- #line 346 "../gcc-1.37/c-parse.y"
- { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ;
- break;}
- case 52:
- #line 352 "../gcc-1.37/c-parse.y"
- { tree type = groktypename (yyvsp[-2].ttype);
- yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ;
- break;}
- case 53:
- #line 355 "../gcc-1.37/c-parse.y"
- { tree type = groktypename (yyvsp[-5].ttype);
- if (pedantic)
- warning ("ANSI C forbids constructor expressions");
- yyval.ttype = digest_init (type, build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)), 0);
- if (TREE_CODE (type) == ARRAY_TYPE && TYPE_SIZE (type) == 0)
- {
- int failure = complete_array_type (type, yyval.ttype, 1);
- if (failure)
- abort ();
- }
- ;
- break;}
- case 55:
- #line 371 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 56:
- #line 373 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 57:
- #line 375 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 58:
- #line 377 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 59:
- #line 379 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 60:
- #line 381 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 61:
- #line 383 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 62:
- #line 385 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 63:
- #line 387 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 64:
- #line 389 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 65:
- #line 391 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 66:
- #line 393 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 67:
- #line 395 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 68:
- #line 397 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 69:
- #line 399 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 70:
- #line 401 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); ;
- break;}
- case 71:
- #line 403 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ;
- break;}
- case 72:
- #line 408 "../gcc-1.37/c-parse.y"
- { yyval.ttype = lastiddecl;
- if (!yyval.ttype || yyval.ttype == error_mark_node)
- {
- if (yychar == YYEMPTY)
- yychar = YYLEX;
- if (yychar == '(')
- {
- yyval.ttype = implicitly_declare (yyvsp[0].ttype);
- assemble_external (yyval.ttype);
- TREE_USED (yyval.ttype) = 1;
- }
- else if (current_function_decl == 0)
- {
- error ("`%s' undeclared, outside of functions",
- IDENTIFIER_POINTER (yyvsp[0].ttype));
- yyval.ttype = error_mark_node;
- }
- else
- {
- if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node
- || IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) != current_function_decl)
- {
- error ("`%s' undeclared (first use this function)",
- IDENTIFIER_POINTER (yyvsp[0].ttype));
-
- if (! undeclared_variable_notice)
- {
- error ("(Each undeclared identifier is reported only once");
- error ("for each function it appears in.)");
- undeclared_variable_notice = 1;
- }
- }
- yyval.ttype = error_mark_node;
- /* Prevent repeated error messages. */
- IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node;
- IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) = current_function_decl;
- }
- }
- else if (! TREE_USED (yyval.ttype))
- {
- if (TREE_EXTERNAL (yyval.ttype))
- assemble_external (yyval.ttype);
- TREE_USED (yyval.ttype) = 1;
- }
- if (TREE_CODE (yyval.ttype) == CONST_DECL)
- yyval.ttype = DECL_INITIAL (yyval.ttype);
- ;
- break;}
- case 74:
- #line 457 "../gcc-1.37/c-parse.y"
- { yyval.ttype = combine_strings (yyvsp[0].ttype); ;
- break;}
- case 75:
- #line 459 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[-1].ttype; ;
- break;}
- case 76:
- #line 461 "../gcc-1.37/c-parse.y"
- { yyval.ttype = error_mark_node; ;
- break;}
- case 77:
- #line 463 "../gcc-1.37/c-parse.y"
- { if (current_function_decl == 0)
- {
- error ("braced-group within expression allowed only inside a function");
- YYERROR;
- }
- keep_next_level ();
- yyval.ttype = expand_start_stmt_expr (); ;
- break;}
- case 78:
- #line 471 "../gcc-1.37/c-parse.y"
- { tree rtl_exp;
- if (pedantic)
- warning ("ANSI C forbids braced-groups within expressions");
- rtl_exp = expand_end_stmt_expr (yyvsp[-2].ttype);
- yyval.ttype = yyvsp[-1].ttype;
- TREE_USED (yyval.ttype) = 0;
- /* Since the statements have side effects,
- consider this volatile. */
- TREE_VOLATILE (yyval.ttype) = 1;
- TREE_TYPE (yyval.ttype) = TREE_TYPE (rtl_exp);
- STMT_BODY (yyval.ttype) = rtl_exp; ;
- break;}
- case 79:
- #line 483 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 80:
- #line 485 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 81:
- #line 487 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 82:
- #line 489 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_component_ref (build_indirect_ref (yyvsp[-2].ttype, "->"), yyvsp[0].ttype); ;
- break;}
- case 83:
- #line 491 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ;
- break;}
- case 84:
- #line 493 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ;
- break;}
- case 86:
- #line 500 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 93:
- #line 520 "../gcc-1.37/c-parse.y"
- { yyval.itype = suspend_momentary ();
- declspec_stack = tree_cons (0, current_declspecs,
- declspec_stack);
- current_declspecs = yyvsp[0].ttype; ;
- break;}
- case 94:
- #line 528 "../gcc-1.37/c-parse.y"
- { current_declspecs = TREE_VALUE (declspec_stack);
- declspec_stack = TREE_CHAIN (declspec_stack);
- resume_momentary (yyvsp[-2].itype); ;
- break;}
- case 95:
- #line 532 "../gcc-1.37/c-parse.y"
- { current_declspecs = TREE_VALUE (declspec_stack);
- declspec_stack = TREE_CHAIN (declspec_stack);
- resume_momentary (yyvsp[-2].itype); ;
- break;}
- case 96:
- #line 536 "../gcc-1.37/c-parse.y"
- { shadow_tag (yyvsp[-1].ttype); ;
- break;}
- case 97:
- #line 538 "../gcc-1.37/c-parse.y"
- { warning ("empty declaration"); ;
- break;}
- case 98:
- #line 547 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 99:
- #line 549 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ;
- break;}
- case 100:
- #line 553 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 101:
- #line 555 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 102:
- #line 557 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 103:
- #line 566 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 104:
- #line 568 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 105:
- #line 570 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 106:
- #line 572 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 107:
- #line 582 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 108:
- #line 584 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ;
- break;}
- case 109:
- #line 588 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 110:
- #line 590 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 114:
- #line 601 "../gcc-1.37/c-parse.y"
- { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype);
- if (pedantic)
- warning ("ANSI C forbids `typeof'"); ;
- break;}
- case 115:
- #line 605 "../gcc-1.37/c-parse.y"
- { yyval.ttype = groktypename (yyvsp[-1].ttype);
- if (pedantic)
- warning ("ANSI C forbids `typeof'"); ;
- break;}
- case 123:
- #line 629 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 124:
- #line 631 "../gcc-1.37/c-parse.y"
- { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype);
- yyval.ttype = yyvsp[-1].ttype;
- if (pedantic)
- warning ("ANSI C forbids use of `asm' keyword");
- ;
- break;}
- case 125:
- #line 640 "../gcc-1.37/c-parse.y"
- { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1); ;
- break;}
- case 126:
- #line 643 "../gcc-1.37/c-parse.y"
- { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;
- break;}
- case 127:
- #line 645 "../gcc-1.37/c-parse.y"
- { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0);
- finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ;
- break;}
- case 128:
- #line 651 "../gcc-1.37/c-parse.y"
- { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1); ;
- break;}
- case 129:
- #line 654 "../gcc-1.37/c-parse.y"
- { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;
- break;}
- case 130:
- #line 656 "../gcc-1.37/c-parse.y"
- { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0);
- finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ;
- break;}
- case 131:
- #line 663 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 132:
- #line 665 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[-2].ttype; ;
- break;}
- case 135:
- #line 675 "../gcc-1.37/c-parse.y"
- { warning ("`%s' attribute directive ignored",
- IDENTIFIER_POINTER (yyvsp[0].ttype));
- yyval.ttype = yyvsp[0].ttype; ;
- break;}
- case 136:
- #line 679 "../gcc-1.37/c-parse.y"
- { /* if not "aligned(1)", then issue warning */
- if (strcmp (IDENTIFIER_POINTER (yyvsp[-3].ttype), "aligned") != 0
- || TREE_CODE (yyvsp[-1].ttype) != INTEGER_CST
- || TREE_INT_CST_LOW (yyvsp[-1].ttype) != 1)
- warning ("`%s' attribute directive ignored",
- IDENTIFIER_POINTER (yyvsp[-3].ttype));
- yyval.ttype = yyvsp[-3].ttype; ;
- break;}
- case 137:
- #line 687 "../gcc-1.37/c-parse.y"
- { warning ("`%s' attribute directive ignored",
- IDENTIFIER_POINTER (yyvsp[-3].ttype));
- yyval.ttype = yyvsp[-3].ttype; ;
- break;}
- case 139:
- #line 695 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE);
- if (pedantic)
- warning ("ANSI C forbids empty initializer braces"); ;
- break;}
- case 140:
- #line 699 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); ;
- break;}
- case 141:
- #line 701 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); ;
- break;}
- case 142:
- #line 703 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 143:
- #line 710 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
- break;}
- case 144:
- #line 712 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ;
- break;}
- case 147:
- #line 727 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[-1].ttype; ;
- break;}
- case 148:
- #line 729 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 149:
- #line 734 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 150:
- #line 736 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
- break;}
- case 151:
- #line 738 "../gcc-1.37/c-parse.y"
- { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 153:
- #line 749 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 154:
- #line 754 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 155:
- #line 756 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
- break;}
- case 156:
- #line 758 "../gcc-1.37/c-parse.y"
- { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 158:
- #line 767 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 159:
- #line 772 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[-1].ttype; ;
- break;}
- case 160:
- #line 774 "../gcc-1.37/c-parse.y"
- { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 161:
- #line 776 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 162:
- #line 778 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
- break;}
- case 164:
- #line 784 "../gcc-1.37/c-parse.y"
- { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype);
- /* Start scope of tag before parsing components. */
- ;
- break;}
- case 165:
- #line 788 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype);
- /* Really define the structure. */
- ;
- break;}
- case 166:
- #line 792 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE),
- yyvsp[-1].ttype); ;
- break;}
- case 167:
- #line 795 "../gcc-1.37/c-parse.y"
- { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ;
- break;}
- case 168:
- #line 797 "../gcc-1.37/c-parse.y"
- { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ;
- break;}
- case 169:
- #line 799 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
- break;}
- case 170:
- #line 801 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE),
- yyvsp[-1].ttype); ;
- break;}
- case 171:
- #line 804 "../gcc-1.37/c-parse.y"
- { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ;
- break;}
- case 172:
- #line 806 "../gcc-1.37/c-parse.y"
- { yyvsp[0].itype = suspend_momentary ();
- yyval.ttype = start_enum (yyvsp[-1].ttype); ;
- break;}
- case 173:
- #line 809 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype));
- resume_momentary (yyvsp[-4].itype); ;
- break;}
- case 174:
- #line 812 "../gcc-1.37/c-parse.y"
- { yyvsp[0].itype = suspend_momentary ();
- yyval.ttype = start_enum (NULL_TREE); ;
- break;}
- case 175:
- #line 815 "../gcc-1.37/c-parse.y"
- { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype));
- resume_momentary (yyvsp[-4].itype); ;
- break;}
- case 176:
- #line 818 "../gcc-1.37/c-parse.y"
- { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ;
- break;}
- case 180:
- #line 829 "../gcc-1.37/c-parse.y"
- { if (pedantic) warning ("comma at end of enumerator list"); ;
- break;}
- case 181:
- #line 833 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 182:
- #line 835 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
- break;}
- case 183:
- #line 837 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("extra semicolon in struct or union specified"); ;
- break;}
- case 184:
- #line 852 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[0].ttype;
- current_declspecs = TREE_VALUE (declspec_stack);
- declspec_stack = TREE_CHAIN (declspec_stack);
- resume_momentary (yyvsp[-1].itype); ;
- break;}
- case 185:
- #line 857 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[0].ttype;
- current_declspecs = TREE_VALUE (declspec_stack);
- declspec_stack = TREE_CHAIN (declspec_stack);
- resume_momentary (yyvsp[-1].itype); ;
- break;}
- case 186:
- #line 862 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 187:
- #line 867 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("ANSI C forbids member declarations with no members");
- yyval.ttype = NULL_TREE; ;
- break;}
- case 189:
- #line 872 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 190:
- #line 877 "../gcc-1.37/c-parse.y"
- { yyval.ttype = grokfield (input_filename, lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ;
- break;}
- case 191:
- #line 879 "../gcc-1.37/c-parse.y"
- { yyval.ttype = grokfield (input_filename, lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ;
- break;}
- case 192:
- #line 881 "../gcc-1.37/c-parse.y"
- { yyval.ttype = grokfield (input_filename, lineno, NULL_TREE, current_declspecs, yyvsp[0].ttype); ;
- break;}
- case 194:
- #line 892 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ;
- break;}
- case 195:
- #line 898 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 196:
- #line 900 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 197:
- #line 905 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 198:
- #line 907 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 199:
- #line 912 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 201:
- #line 918 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 202:
- #line 920 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 203:
- #line 925 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 204:
- #line 927 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
- break;}
- case 205:
- #line 932 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[-1].ttype; ;
- break;}
- case 206:
- #line 935 "../gcc-1.37/c-parse.y"
- { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 207:
- #line 937 "../gcc-1.37/c-parse.y"
- { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 208:
- #line 939 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 209:
- #line 941 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 210:
- #line 943 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
- break;}
- case 211:
- #line 945 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
- break;}
- case 212:
- #line 947 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
- break;}
- case 213:
- #line 949 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ;
- break;}
- case 220:
- #line 971 "../gcc-1.37/c-parse.y"
- { pushlevel (0);
- clear_last_expr ();
- push_momentary ();
- expand_start_bindings (0); ;
- break;}
- case 221:
- #line 981 "../gcc-1.37/c-parse.y"
- {;
- break;}
- case 223:
- #line 986 "../gcc-1.37/c-parse.y"
- { yyval.ttype = 0; ;
- break;}
- case 224:
- #line 988 "../gcc-1.37/c-parse.y"
- { expand_end_bindings (getdecls (), 1, 0);
- yyval.ttype = poplevel (1, 1, 0);
- pop_momentary (); ;
- break;}
- case 225:
- #line 992 "../gcc-1.37/c-parse.y"
- { expand_end_bindings (getdecls (), kept_level_p (), 0);
- yyval.ttype = poplevel (kept_level_p (), 0, 0);
- pop_momentary (); ;
- break;}
- case 226:
- #line 996 "../gcc-1.37/c-parse.y"
- { expand_end_bindings (getdecls (), kept_level_p (), 0);
- yyval.ttype = poplevel (kept_level_p (), 0, 0);
- pop_momentary (); ;
- break;}
- case 227:
- #line 1003 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0); ;
- break;}
- case 229:
- #line 1009 "../gcc-1.37/c-parse.y"
- {;
- break;}
- case 230:
- #line 1011 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- /* Do default conversion if safe and possibly important,
- in case within ({...}). */
- if ((TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == ARRAY_TYPE
- && lvalue_p (yyvsp[-1].ttype))
- || TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == FUNCTION_TYPE)
- yyvsp[-1].ttype = default_conversion (yyvsp[-1].ttype);
- expand_expr_stmt (yyvsp[-1].ttype);
- clear_momentary (); ;
- break;}
- case 231:
- #line 1021 "../gcc-1.37/c-parse.y"
- { expand_start_else (); ;
- break;}
- case 232:
- #line 1023 "../gcc-1.37/c-parse.y"
- { expand_end_else (); ;
- break;}
- case 233:
- #line 1025 "../gcc-1.37/c-parse.y"
- { expand_end_cond (); ;
- break;}
- case 234:
- #line 1027 "../gcc-1.37/c-parse.y"
- { emit_nop ();
- emit_line_note (input_filename, lineno);
- expand_start_loop (1); ;
- break;}
- case 235:
- #line 1031 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ;
- break;}
- case 236:
- #line 1034 "../gcc-1.37/c-parse.y"
- { expand_end_loop (); ;
- break;}
- case 237:
- #line 1036 "../gcc-1.37/c-parse.y"
- { emit_nop ();
- emit_line_note (input_filename, lineno);
- expand_start_loop_continue_elsewhere (1); ;
- break;}
- case 238:
- #line 1040 "../gcc-1.37/c-parse.y"
- { expand_loop_continue_here (); ;
- break;}
- case 239:
- #line 1042 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-2].ttype));
- expand_end_loop ();
- clear_momentary (); ;
- break;}
- case 240:
- #line 1048 "../gcc-1.37/c-parse.y"
- { emit_nop ();
- emit_line_note (input_filename, lineno);
- if (yyvsp[-1].ttype) expand_expr_stmt (yyvsp[-1].ttype);
- expand_start_loop_continue_elsewhere (1); ;
- break;}
- case 241:
- #line 1053 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- if (yyvsp[-1].ttype)
- expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ;
- break;}
- case 242:
- #line 1059 "../gcc-1.37/c-parse.y"
- { push_momentary ();
- yyvsp[0].itype = lineno; ;
- break;}
- case 243:
- #line 1062 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, yyvsp[-2].itype);
- expand_loop_continue_here ();
- if (yyvsp[-3].ttype)
- expand_expr_stmt (yyvsp[-3].ttype);
- pop_momentary ();
- expand_end_loop (); ;
- break;}
- case 244:
- #line 1069 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- c_expand_start_case (yyvsp[-1].ttype);
- /* Don't let the tree nodes for $3 be discarded by
- clear_momentary during the parsing of the next stmt. */
- push_momentary (); ;
- break;}
- case 245:
- #line 1075 "../gcc-1.37/c-parse.y"
- { expand_end_case (yyvsp[-3].ttype);
- pop_momentary (); ;
- break;}
- case 246:
- #line 1078 "../gcc-1.37/c-parse.y"
- { register tree value = fold (yyvsp[-1].ttype);
- register tree label
- = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
-
- /* build_c_cast puts on a NOP_EXPR to make a non-lvalue.
- Strip such NOP_EXPRs. */
- if (TREE_CODE (value) == NOP_EXPR
- && TREE_TYPE (value) == TREE_TYPE (TREE_OPERAND (value, 0)))
- value = TREE_OPERAND (value, 0);
-
- if (TREE_CODE (value) != INTEGER_CST
- && value != error_mark_node)
- {
- error ("case label does not reduce to an integer constant");
- value = error_mark_node;
- }
- else
- /* Promote char or short to int. */
- value = default_conversion (value);
- if (value != error_mark_node)
- {
- int success = pushcase (value, label);
- if (success == 1)
- error ("case label not within a switch statement");
- else if (success == 2)
- error ("duplicate case value");
- else if (success == 3)
- warning ("case value out of range");
- }
- ;
- break;}
- case 248:
- #line 1110 "../gcc-1.37/c-parse.y"
- {
- register tree label
- = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
- int success = pushcase (NULL_TREE, label);
- if (success == 1)
- error ("default label not within a switch statement");
- else if (success == 2)
- error ("multiple default labels in one switch");
- ;
- break;}
- case 250:
- #line 1121 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- if ( ! expand_exit_something ())
- error ("break statement not within loop or switch"); ;
- break;}
- case 251:
- #line 1125 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- if (! expand_continue_loop ())
- error ("continue statement not within a loop"); ;
- break;}
- case 252:
- #line 1129 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- c_expand_return (NULL_TREE); ;
- break;}
- case 253:
- #line 1132 "../gcc-1.37/c-parse.y"
- { emit_line_note (input_filename, lineno);
- c_expand_return (yyvsp[-1].ttype); ;
- break;}
- case 254:
- #line 1135 "../gcc-1.37/c-parse.y"
- { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype);
- emit_line_note (input_filename, lineno);
- expand_asm (yyvsp[-2].ttype); ;
- break;}
- case 255:
- #line 1140 "../gcc-1.37/c-parse.y"
- { if (TREE_CHAIN (yyvsp[-4].ttype)) yyvsp[-4].ttype = combine_strings (yyvsp[-4].ttype);
- emit_line_note (input_filename, lineno);
- c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE,
- yyvsp[-6].ttype == ridpointers[(int)RID_VOLATILE],
- input_filename, lineno); ;
- break;}
- case 256:
- #line 1147 "../gcc-1.37/c-parse.y"
- { if (TREE_CHAIN (yyvsp[-6].ttype)) yyvsp[-6].ttype = combine_strings (yyvsp[-6].ttype);
- emit_line_note (input_filename, lineno);
- c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE,
- yyvsp[-8].ttype == ridpointers[(int)RID_VOLATILE],
- input_filename, lineno); ;
- break;}
- case 257:
- #line 1155 "../gcc-1.37/c-parse.y"
- { if (TREE_CHAIN (yyvsp[-8].ttype)) yyvsp[-8].ttype = combine_strings (yyvsp[-8].ttype);
- emit_line_note (input_filename, lineno);
- c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype,
- yyvsp[-10].ttype == ridpointers[(int)RID_VOLATILE],
- input_filename, lineno); ;
- break;}
- case 258:
- #line 1161 "../gcc-1.37/c-parse.y"
- { tree decl;
- emit_line_note (input_filename, lineno);
- decl = lookup_label (yyvsp[-1].ttype);
- TREE_USED (decl) = 1;
- expand_goto (decl); ;
- break;}
- case 259:
- #line 1167 "../gcc-1.37/c-parse.y"
- { tree label = define_label (input_filename, lineno, yyvsp[-1].ttype);
- emit_nop ();
- if (label)
- expand_label (label); ;
- break;}
- case 262:
- #line 1179 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("ANSI C forbids use of `asm' keyword");
- emit_line_note (input_filename, lineno); ;
- break;}
- case 263:
- #line 1183 "../gcc-1.37/c-parse.y"
- { if (pedantic)
- warning ("ANSI C forbids use of `asm' keyword");
- emit_line_note (input_filename, lineno); ;
- break;}
- case 264:
- #line 1190 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 266:
- #line 1197 "../gcc-1.37/c-parse.y"
- { yyval.ttype = NULL_TREE; ;
- break;}
- case 269:
- #line 1204 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
- break;}
- case 270:
- #line 1209 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
- break;}
- case 271:
- #line 1214 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ;
- break;}
- case 272:
- #line 1216 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ;
- break;}
- case 273:
- #line 1222 "../gcc-1.37/c-parse.y"
- { pushlevel (0);
- declare_parm_level (); ;
- break;}
- case 274:
- #line 1225 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[0].ttype;
- parmlist_tags_warning ();
- poplevel (0, 0, 0); ;
- break;}
- case 275:
- #line 1233 "../gcc-1.37/c-parse.y"
- { pushlevel (0);
- declare_parm_level (); ;
- break;}
- case 276:
- #line 1236 "../gcc-1.37/c-parse.y"
- { yyval.ttype = yyvsp[0].ttype;
- parmlist_tags_warning ();
- poplevel (0, 0, 0); ;
- break;}
- case 278:
- #line 1244 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ;
- break;}
- case 279:
- #line 1246 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;
- break;}
- case 281:
- #line 1252 "../gcc-1.37/c-parse.y"
- { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;
- break;}
- case 282:
- #line 1258 "../gcc-1.37/c-parse.y"
- { yyval.ttype = get_parm_info (0); ;
- break;}
- case 283:
- #line 1260 "../gcc-1.37/c-parse.y"
- { yyval.ttype = get_parm_info (1); ;
- break;}
- case 284:
- #line 1262 "../gcc-1.37/c-parse.y"
- { yyval.ttype = get_parm_info (0); ;
- break;}
- case 285:
- #line 1267 "../gcc-1.37/c-parse.y"
- { push_parm_decl (yyvsp[0].ttype); ;
- break;}
- case 286:
- #line 1269 "../gcc-1.37/c-parse.y"
- { push_parm_decl (yyvsp[0].ttype); ;
- break;}
- case 287:
- #line 1276 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
- break;}
- case 288:
- #line 1278 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
- break;}
- case 289:
- #line 1280 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 290:
- #line 1282 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
- break;}
- case 291:
- #line 1284 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
- break;}
- case 292:
- #line 1290 "../gcc-1.37/c-parse.y"
- { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
- break;}
- case 293:
- #line 1292 "../gcc-1.37/c-parse.y"
- { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
- break;}
- }
- /* the action file gets copied in in place of this dollarsign */
- #line 327 "bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
- #ifdef YYLSP_NEEDED
- yylsp -= yylen;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
- #endif
-
- *++yyvsp = yyval;
-
- #ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
- #endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
- yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
- yyerror("parse error");
- }
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
- #endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
- yyerrdefault: /* current state does not do anything special for the error token. */
-
- #if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
- #endif
-
- yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
- #ifdef YYLSP_NEEDED
- yylsp--;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
- #endif
-
- yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
- #endif
-
- *++yyvsp = yylval;
- #ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
- #endif
-
- yystate = yyn;
- goto yynewstate;
- }
- #line 1294 "../gcc-1.37/c-parse.y"
-
-
- /* Return something to represent absolute declarators containing a *.
- TARGET is the absolute declarator that the * contains.
- TYPE_QUALS is a list of modifiers such as const or volatile
- to apply to the pointer type, represented as identifiers.
-
- We return an INDIRECT_REF whose "contents" are TARGET
- and whose type is the modifier list. */
-
- static tree
- make_pointer_declarator (type_quals, target)
- tree type_quals, target;
- {
- return build (INDIRECT_REF, type_quals, target);
- }
-
- /* Given a chain of STRING_CST nodes,
- concatenate them into one STRING_CST
- and give it a suitable array-of-chars data type. */
-
- static tree
- combine_strings (strings)
- tree strings;
- {
- register tree value, t;
- register int length = 1;
- int wide_length = 0;
- int wide_flag = 0;
-
- if (TREE_CHAIN (strings))
- {
- /* More than one in the chain, so concatenate. */
- register char *p, *q;
-
- /* Don't include the \0 at the end of each substring,
- except for the last one.
- Count wide strings and ordinary strings separately. */
- for (t = strings; t; t = TREE_CHAIN (t))
- {
- if (TREE_TYPE (t) == int_array_type_node)
- {
- wide_length += (TREE_STRING_LENGTH (t) - 1);
- wide_flag = 1;
- }
- else
- length += (TREE_STRING_LENGTH (t) - 1);
- }
-
- /* If anything is wide, the non-wides will be converted,
- which makes them take more space. */
- if (wide_flag)
- length = length * UNITS_PER_WORD + wide_length;
-
- p = (char *) savealloc (length);
-
- /* Copy the individual strings into the new combined string.
- If the combined string is wide, convert the chars to ints
- for any individual strings that are not wide. */
-
- q = p;
- for (t = strings; t; t = TREE_CHAIN (t))
- {
- int len = TREE_STRING_LENGTH (t) - 1;
- if ((TREE_TYPE (t) == int_array_type_node) == wide_flag)
- {
- bcopy (TREE_STRING_POINTER (t), q, len);
- q += len;
- }
- else
- {
- int i;
- for (i = 0; i < len; i++)
- ((int *) q)[i] = TREE_STRING_POINTER (t)[i];
- q += len * UNITS_PER_WORD;
- }
- }
- *q = 0;
-
- value = make_node (STRING_CST);
- TREE_STRING_POINTER (value) = p;
- TREE_STRING_LENGTH (value) = length;
- TREE_LITERAL (value) = 1;
- }
- else
- {
- value = strings;
- length = TREE_STRING_LENGTH (value);
- if (TREE_TYPE (value) == int_array_type_node)
- wide_flag = 1;
- }
-
- /* Create the array type for the string constant.
- -Wwrite-strings says make the string constant an array of const char
- so that copying it to a non-const pointer will get a warning. */
- if (warn_write_strings)
- {
- tree elements
- = build_type_variant (wide_flag ? integer_type_node : char_type_node,
- 1, 0);
- TREE_TYPE (value)
- = build_array_type (elements,
- build_index_type (build_int_2 (length - 1, 0)));
- }
- else
- TREE_TYPE (value)
- = build_array_type (wide_flag ? integer_type_node : char_type_node,
- build_index_type (build_int_2 (length - 1, 0)));
- TREE_LITERAL (value) = 1;
- TREE_STATIC (value) = 1;
- return value;
- }
-
- int lineno; /* current line number in file being read */
-
- FILE *finput; /* input file.
- Normally a pipe from the preprocessor. */
-
- /* lexical analyzer */
-
- static int maxtoken; /* Current nominal length of token buffer. */
- static char *token_buffer; /* Pointer to token buffer.
- Actual allocated length is maxtoken + 2. */
- static int max_wide; /* Current nominal length of wide_buffer. */
- static int *wide_buffer; /* Pointer to wide-string buffer.
- Actual allocated length is max_wide + 1. */
-
- /* Nonzero if end-of-file has been seen on input. */
- static int end_of_file;
-
- /* Data type that represents the GNU C reserved words. */
- struct resword { char *name; short token; enum rid rid; };
-
- #define MIN_WORD_LENGTH 2 /* minimum size for C keyword */
- #define MAX_WORD_LENGTH 13 /* maximum size for C keyword */
- #define MIN_HASH_VALUE 7 /* range of the hash keys values */
- #define MAX_HASH_VALUE 91 /* for the perfect hash generator */
- #define NORID RID_UNUSED
-
- /* This function performs the minimum-perfect hash mapping from input
- string to reswords table index. It only looks at the first and
- last characters in the string, thus assuring the O(1) lookup time
- (this keeps our constant down to an insignificant amount!). Compiling
- the following 2 functions as inline removes all overhead of the
- function calls. */
-
- #ifdef __GNUC__
- __inline
- #endif
- static int
- hash (str, len)
- register char *str;
- register int len;
- {
- /* This table is used to build the hash table index that recognizes
- reserved words in 0(1) steps. It is larger than strictly necessary,
- but I'm trading off the space for the time-saving luxury of avoiding
- subtraction of an offset. All those ``91's'' (actually just a
- short-hand for MAX_HASH_VALUE #defined above) are used to speed up
- the search when the string found on the input stream doesn't have a
- first or last character that is part of the set of alphabetic
- characters that comprise the first or last characters in C
- reserved words. */
-
- static int hash_table[] =
- {
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 1, 91, 2, 1, 32,
- 7, 5, 18, 20, 1, 17, 91, 1, 18, 1,
- 28, 1, 23, 91, 12, 20, 1, 41, 7, 15,
- 91, 91, 10, 91, 91, 91, 91, 91,
- };
- register int hval = len ;
-
- switch (hval)
- {
- default:
- case 3:
- hval += hash_table[str[2]];
- case 2:
- case 1:
- return hval + hash_table[str[0]] + hash_table[str[len - 1]];
- }
- }
-
- /* This routine attempts to match the string found in the reswords table
- with the one from the input stream. If all the relevant details
- match then an actual strcmp comparison is performed and the address of
- correct struct resword entry is returned. Otherwise, a NULL
- pointer is returned. */
-
- #ifdef __GNUC__
- __inline
- #endif
- struct resword *
- is_reserved_word (str, len)
- register char *str;
- register int len;
- {
- /* This is the hash table of keywords.
- The order of keywords has been chosen for perfect hashing.
- Therefore, this table cannot be updated by hand.
- Use the program ``gperf,'' available with the latest libg++
- distribution, to generate an updated table. A file called
- c-parse.gperf, distributed with GNU C, contains the keyword file. */
-
- static struct resword reswords[] =
- {
- { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", },
- {"asm", ASM, NORID },
- {"auto", SCSPEC, RID_AUTO },
- {"__asm", ASM, NORID },
- {"do", DO, NORID },
- {"__asm__", ASM, NORID },
- {"break", BREAK, NORID },
- {"__typeof__", TYPEOF, NORID },
- { "", },
- {"__alignof__", ALIGNOF, NORID },
- { "", },
- {"__attribute__", ATTRIBUTE, NORID },
- { "", },
- {"__attribute", ATTRIBUTE, NORID },
- { "", },
- {"__volatile__", TYPE_QUAL, RID_VOLATILE },
- {"int", TYPESPEC, RID_INT },
- {"__volatile", TYPE_QUAL, RID_VOLATILE },
- { "", },
- {"float", TYPESPEC, RID_FLOAT },
- {"goto", GOTO, NORID },
- {"short", TYPESPEC, RID_SHORT },
- {"__typeof", TYPEOF, NORID },
- {"__inline__", SCSPEC, RID_INLINE },
- {"__alignof", ALIGNOF, NORID },
- {"__inline", SCSPEC, RID_INLINE },
- {"__signed__", TYPESPEC, RID_SIGNED },
- {"default", DEFAULT, NORID },
- {"else", ELSE, NORID },
- {"void", TYPESPEC, RID_VOID },
- {"__signed", TYPESPEC, RID_SIGNED },
- {"if", IF, NORID },
- {"volatile", TYPE_QUAL, RID_VOLATILE },
- {"struct", STRUCT, NORID },
- {"extern", SCSPEC, RID_EXTERN },
- {"__const", TYPE_QUAL, RID_CONST },
- {"while", WHILE, NORID },
- {"__const__", TYPE_QUAL, RID_CONST },
- {"switch", SWITCH, NORID },
- {"for", FOR, NORID },
- {"inline", SCSPEC, RID_INLINE },
- {"return", RETURN, NORID },
- {"typeof", TYPEOF, NORID },
- {"typedef", SCSPEC, RID_TYPEDEF },
- {"char", TYPESPEC, RID_CHAR },
- {"enum", ENUM, NORID },
- {"register", SCSPEC, RID_REGISTER },
- {"signed", TYPESPEC, RID_SIGNED },
- {"sizeof", SIZEOF, NORID },
- { "", }, { "", }, { "", }, { "", },
- {"double", TYPESPEC, RID_DOUBLE },
- {"static", SCSPEC, RID_STATIC },
- {"case", CASE, NORID },
- { "", }, { "", }, { "", }, { "", },
- {"const", TYPE_QUAL, RID_CONST },
- { "", }, { "", }, { "", },
- {"long", TYPESPEC, RID_LONG },
- { "", }, { "", },
- {"continue", CONTINUE, NORID },
- { "", }, { "", },
- {"unsigned", TYPESPEC, RID_UNSIGNED },
- { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", },
- { "", }, { "", }, { "", }, { "", }, { "", },
- {"union", UNION, NORID },
- };
-
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
- {
- register int key = hash (str, len);
-
- if (key <= MAX_HASH_VALUE)
- {
- register char *s = reswords[key].name;
-
- if (*s == *str && !strcmp (str + 1, s + 1))
- return &reswords[key];
- }
- }
- return 0;
- }
-
- /* The elements of `ridpointers' are identifier nodes
- for the reserved type names and storage classes.
- It is indexed by a RID_... value. */
-
- tree ridpointers[(int) RID_MAX];
-
- int check_newline ();
-
- void
- init_lex ()
- {
- /* Start it at 0, because check_newline is called at the very beginning
- and will increment it to 1. */
- lineno = 0;
-
- maxtoken = 40;
- token_buffer = (char *) xmalloc (maxtoken + 2);
- max_wide = 40;
- wide_buffer = (int *) xmalloc (max_wide + 1);
-
- ridpointers[(int) RID_INT] = get_identifier ("int");
- ridpointers[(int) RID_CHAR] = get_identifier ("char");
- ridpointers[(int) RID_VOID] = get_identifier ("void");
- ridpointers[(int) RID_FLOAT] = get_identifier ("float");
- ridpointers[(int) RID_DOUBLE] = get_identifier ("double");
- ridpointers[(int) RID_SHORT] = get_identifier ("short");
- ridpointers[(int) RID_LONG] = get_identifier ("long");
- ridpointers[(int) RID_UNSIGNED] = get_identifier ("unsigned");
- ridpointers[(int) RID_SIGNED] = get_identifier ("signed");
- ridpointers[(int) RID_INLINE] = get_identifier ("inline");
- ridpointers[(int) RID_CONST] = get_identifier ("const");
- ridpointers[(int) RID_VOLATILE] = get_identifier ("volatile");
- ridpointers[(int) RID_AUTO] = get_identifier ("auto");
- ridpointers[(int) RID_STATIC] = get_identifier ("static");
- ridpointers[(int) RID_EXTERN] = get_identifier ("extern");
- ridpointers[(int) RID_TYPEDEF] = get_identifier ("typedef");
- ridpointers[(int) RID_REGISTER] = get_identifier ("register");
- }
-
- static void
- reinit_parse_for_function ()
- {
- }
-
- /* If C is not whitespace, return C.
- Otherwise skip whitespace and return first nonwhite char read. */
-
- static int
- skip_white_space (c)
- register int c;
- {
- #if 0
- register int inside;
- #endif
-
- for (;;)
- {
- switch (c)
- {
- /* Don't recognize comments in cc1: all comments are removed by cpp,
- and cpp output can include / and * consecutively as operators. */
- #if 0
- case '/':
- c = getc (finput);
- if (c != '*')
- {
- ungetc (c, finput);
- return '/';
- }
-
- c = getc (finput);
-
- inside = 1;
- while (inside)
- {
- if (c == '*')
- {
- while (c == '*')
- c = getc (finput);
-
- if (c == '/')
- {
- inside = 0;
- c = getc (finput);
- }
- }
- else if (c == '\n')
- {
- lineno++;
- c = getc (finput);
- }
- else if (c == EOF)
- {
- error ("unterminated comment");
- break;
- }
- else
- c = getc (finput);
- }
-
- break;
- #endif
-
- case '\n':
- c = check_newline ();
- break;
-
- case ' ':
- case '\t':
- case '\f':
- case '\r':
- case '\v':
- case '\b':
- c = getc (finput);
- break;
-
- case '\\':
- c = getc (finput);
- if (c == '\n')
- lineno++;
- else
- error ("stray '\\' in program");
- c = getc (finput);
- break;
-
- default:
- return (c);
- }
- }
- }
-
-
-
- /* Make the token buffer longer, preserving the data in it.
- P should point to just beyond the last valid character in the old buffer.
- The value we return is a pointer to the new buffer
- at a place corresponding to P. */
-
- static char *
- extend_token_buffer (p)
- char *p;
- {
- int offset = p - token_buffer;
-
- maxtoken = maxtoken * 2 + 10;
- token_buffer = (char *) xrealloc (token_buffer, maxtoken + 2);
-
- return token_buffer + offset;
- }
-
- /* At the beginning of a line, increment the line number
- and process any #-directive on this line.
- If the line is a #-directive, read the entire line and return a newline.
- Otherwise, return the line's first non-whitespace character. */
-
- int
- check_newline ()
- {
- register int c;
- register int token;
-
- lineno++;
-
- /* Read first nonwhite char on the line. */
-
- c = getc (finput);
- while (c == ' ' || c == '\t')
- c = getc (finput);
-
- if (c != '#')
- {
- /* If not #, return it so caller will use it. */
- return c;
- }
-
- /* Read first nonwhite char after the `#'. */
-
- c = getc (finput);
- while (c == ' ' || c == '\t')
- c = getc (finput);
-
- /* If a letter follows, then if the word here is `line', skip
- it and ignore it; otherwise, ignore the line, with an error
- if the word isn't `pragma'. */
-
- if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
- {
- if (c == 'p')
- {
- if (getc (finput) == 'r'
- && getc (finput) == 'a'
- && getc (finput) == 'g'
- && getc (finput) == 'm'
- && getc (finput) == 'a'
- && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
- goto skipline;
- }
-
- else if (c == 'l')
- {
- if (getc (finput) == 'i'
- && getc (finput) == 'n'
- && getc (finput) == 'e'
- && ((c = getc (finput)) == ' ' || c == '\t'))
- goto linenum;
- }
- else if (c == 'i')
- {
- if (getc (finput) == 'd'
- && getc (finput) == 'e'
- && getc (finput) == 'n'
- && getc (finput) == 't'
- && ((c = getc (finput)) == ' ' || c == '\t'))
- {
- extern FILE *asm_out_file;
-
- if (pedantic)
- error ("ANSI C does not allow #ident");
-
- /* Here we have just seen `#ident '.
- A string constant should follow. */
-
- while (c == ' ' || c == '\t')
- c = getc (finput);
-
- /* If no argument, ignore the line. */
- if (c == '\n')
- return c;
-
- ungetc (c, finput);
- token = yylex ();
- if (token != STRING
- || TREE_CODE (yylval.ttype) != STRING_CST)
- {
- error ("invalid #ident");
- goto skipline;
- }
-
- #ifdef ASM_OUTPUT_IDENT
- ASM_OUTPUT_IDENT (asm_out_file, TREE_STRING_POINTER (yylval.ttype));
- #endif
-
- /* Skip the rest of this line. */
- goto skipline;
- }
- }
-
- error ("undefined or invalid # directive");
- goto skipline;
- }
-
- linenum:
- /* Here we have either `#line' or `# <nonletter>'.
- In either case, it should be a line number; a digit should follow. */
-
- while (c == ' ' || c == '\t')
- c = getc (finput);
-
- /* If the # is the only nonwhite char on the line,
- just ignore it. Check the new newline. */
- if (c == '\n')
- return c;
-
- /* Something follows the #; read a token. */
-
- ungetc (c, finput);
- token = yylex ();
-
- if (token == CONSTANT
- && TREE_CODE (yylval.ttype) == INTEGER_CST)
- {
- int old_lineno = lineno;
- /* subtract one, because it is the following line that
- gets the specified number */
-
- int l = TREE_INT_CST_LOW (yylval.ttype) - 1;
-
- /* Is this the last nonwhite stuff on the line? */
- c = getc (finput);
- while (c == ' ' || c == '\t')
- c = getc (finput);
- if (c == '\n')
- {
- /* No more: store the line number and check following line. */
- lineno = l;
- return c;
- }
- ungetc (c, finput);
-
- /* More follows: it must be a string constant (filename). */
-
- token = yylex ();
- if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
- {
- error ("invalid #line");
- goto skipline;
- }
-
- input_filename
- = (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1);
- strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype));
- lineno = l;
-
- if (main_input_filename == 0)
- main_input_filename = input_filename;
-
- /* Is this the last nonwhite stuff on the line? */
- c = getc (finput);
- while (c == ' ' || c == '\t')
- c = getc (finput);
- if (c == '\n')
- return c;
- ungetc (c, finput);
-
- token = yylex ();
-
- /* `1' after file name means entering new file.
- `2' after file name means just left a file. */
-
- if (token == CONSTANT
- && TREE_CODE (yylval.ttype) == INTEGER_CST)
- {
- if (TREE_INT_CST_LOW (yylval.ttype) == 1)
- {
- struct file_stack *p
- = (struct file_stack *) xmalloc (sizeof (struct file_stack));
- input_file_stack->line = old_lineno;
- p->next = input_file_stack;
- p->name = input_filename;
- input_file_stack = p;
- input_file_stack_tick++;
- }
- else if (input_file_stack->next)
- {
- struct file_stack *p = input_file_stack;
- input_file_stack = p->next;
- free (p);
- input_file_stack_tick++;
- }
- else
- error ("#-lines for entering and leaving files don't match");
- }
- }
- else
- error ("invalid #-line");
-
- /* skip the rest of this line. */
- skipline:
- if (c == '\n')
- return c;
- while ((c = getc (finput)) != EOF && c != '\n');
- return c;
- }
-
- #define isalnum(char) ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || (char >= '0' && char <= '9'))
- #define isdigit(char) (char >= '0' && char <= '9')
- #define ENDFILE -1 /* token that represents end-of-file */
-
-
- static int
- readescape ()
- {
- register int c = getc (finput);
- register int count, code;
- int firstdig;
-
- switch (c)
- {
- case 'x':
- code = 0;
- count = 0;
- while (1)
- {
- c = getc (finput);
- if (!(c >= 'a' && c <= 'f')
- && !(c >= 'A' && c <= 'F')
- && !(c >= '0' && c <= '9'))
- {
- ungetc (c, finput);
- break;
- }
- code *= 16;
- if (c >= 'a' && c <= 'f')
- code += c - 'a' + 10;
- if (c >= 'A' && c <= 'F')
- code += c - 'A' + 10;
- if (c >= '0' && c <= '9')
- code += c - '0';
- if (count == 0)
- firstdig = code;
- count++;
- }
- if (count == 0)
- error ("\\x used with no following hex digits");
- else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node)
- || ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
- <= firstdig))
- warning ("hex escape out of range");
- return code;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7':
- code = 0;
- count = 0;
- while ((c <= '7') && (c >= '0') && (count++ < 3))
- {
- code = (code * 8) + (c - '0');
- c = getc (finput);
- }
- ungetc (c, finput);
- return code;
-
- case '\\': case '\'': case '"':
- return c;
-
- case '\n':
- lineno++;
- return -1;
-
- case 'n':
- return TARGET_NEWLINE;
-
- case 't':
- return TARGET_TAB;
-
- case 'r':
- return TARGET_CR;
-
- case 'f':
- return TARGET_FF;
-
- case 'b':
- return TARGET_BS;
-
- case 'a':
- return TARGET_BELL;
-
- case 'v':
- return TARGET_VT;
-
- case 'E':
- return 033;
-
- case '?':
- /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */
- case '(':
- case '{':
- case '[':
- return c;
- }
- if (c >= 040 && c <= 0177)
- warning ("unknown escape sequence `\\%c'", c);
- else
- warning ("unknown escape sequence: `\\' followed by char code 0x%x", c);
- return c;
- }
-
- void
- yyerror (string)
- char *string;
- {
- char buf[200];
-
- strcpy (buf, string);
-
- /* We can't print string and character constants well
- because the token_buffer contains the result of processing escapes. */
- if (end_of_file)
- strcat (buf, " at end of input");
- else if (token_buffer[0] == 0)
- strcat (buf, " at null character");
- else if (token_buffer[0] == '"')
- strcat (buf, " before string constant");
- else if (token_buffer[0] == '\'')
- strcat (buf, " before character constant");
- else if (token_buffer[0] < 040 || token_buffer[0] >= 0177)
- sprintf (buf + strlen (buf), " before character 0%o", token_buffer[0]);
- else
- strcat (buf, " before `%s'");
-
- error (buf, token_buffer);
- }
-
- static int nextchar = -1;
-
- static int
- yylex ()
- {
- register int c;
- register char *p;
- register int value;
- int wide_flag = 0;
-
- if (nextchar >= 0)
- c = nextchar, nextchar = -1;
- else
- c = getc (finput);
-
- /* Effectively do c = skip_white_space (c)
- but do it faster in the usual cases. */
- while (1)
- switch (c)
- {
- case ' ':
- case '\t':
- case '\f':
- case '\r':
- case '\v':
- case '\b':
- c = getc (finput);
- break;
-
- case '\n':
- case '/':
- case '\\':
- c = skip_white_space (c);
- default:
- goto found_nonwhite;
- }
- found_nonwhite:
-
- token_buffer[0] = c;
- token_buffer[1] = 0;
-
- /* yylloc.first_line = lineno; */
-
- switch (c)
- {
- case EOF:
- end_of_file = 1;
- token_buffer[0] = 0;
- value = ENDFILE;
- break;
-
- case '$':
- if (dollars_in_ident)
- goto letter;
- return '$';
-
- case 'L':
- /* Capital L may start a wide-string or wide-character constant. */
- {
- register int c = getc (finput);
- if (c == '\'')
- {
- wide_flag = 1;
- goto char_constant;
- }
- if (c == '"')
- {
- wide_flag = 1;
- goto string_constant;
- }
- ungetc (c, finput);
- }
-
- case 'A': case 'B': case 'C': case 'D': case 'E':
- case 'F': case 'G': case 'H': case 'I': case 'J':
- case 'K': case 'M': case 'N': case 'O':
- case 'P': case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X': case 'Y':
- case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e':
- case 'f': case 'g': case 'h': case 'i': case 'j':
- case 'k': case 'l': case 'm': case 'n': case 'o':
- case 'p': case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x': case 'y':
- case 'z':
- case '_':
- letter:
- p = token_buffer;
- while (isalnum (c) || c == '_' || c == '$')
- {
- if (p >= token_buffer + maxtoken)
- p = extend_token_buffer (p);
- if (c == '$' && ! dollars_in_ident)
- break;
-
- *p++ = c;
- c = getc (finput);
- }
-
- *p = 0;
- nextchar = c;
-
- value = IDENTIFIER;
- yylval.itype = 0;
-
- /* Try to recognize a keyword. Uses minimum-perfect hash function */
-
- {
- register struct resword *ptr;
-
- if (ptr = is_reserved_word (token_buffer, p - token_buffer))
- {
- if (ptr->rid)
- yylval.ttype = ridpointers[(int) ptr->rid];
- if ((! flag_no_asm
- /* -fno-asm means don't recognize the non-ANSI keywords. */
- || ((int) ptr->token != ASM
- && (int) ptr->token != TYPEOF
- && ptr->rid != RID_INLINE)
- /* Recognize __asm and __inline despite -fno-asm. */
- || token_buffer[0] == '_')
- /* -ftraditional means don't recognize nontraditional keywords
- typeof, const, volatile, signed or inline. */
- && (! flag_traditional
- || ((int) ptr->token != TYPE_QUAL
- && (int) ptr->token != TYPEOF
- && ptr->rid != RID_SIGNED
- && ptr->rid != RID_INLINE)
- /* Recognize __inline, etc. despite -ftraditional. */
- || token_buffer[0] == '_'))
- value = (int) ptr->token;
- }
- }
-
- /* If we did not find a keyword, look for an identifier
- (or a typename). */
-
- if (value == IDENTIFIER)
- {
- yylval.ttype = get_identifier (token_buffer);
- lastiddecl = lookup_name (yylval.ttype);
-
- if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL)
- value = TYPENAME;
- }
-
- break;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case '.':
- {
- int base = 10;
- int count = 0;
- int largest_digit = 0;
- int numdigits = 0;
- /* for multi-precision arithmetic,
- we store only 8 live bits in each short,
- giving us 64 bits of reliable precision */
- short shorts[8];
- int overflow = 0;
-
- enum anon1 { NOT_FLOAT, AFTER_POINT, TOO_MANY_POINTS} floatflag
- = NOT_FLOAT;
-
- for (count = 0; count < 8; count++)
- shorts[count] = 0;
-
- p = token_buffer;
- *p++ = c;
-
- if (c == '0')
- {
- *p++ = (c = getc (finput));
- if ((c == 'x') || (c == 'X'))
- {
- base = 16;
- *p++ = (c = getc (finput));
- }
- else
- {
- base = 8;
- numdigits++;
- }
- }
-
- /* Read all the digits-and-decimal-points. */
-
- while (c == '.'
- || (isalnum (c) && (c != 'l') && (c != 'L')
- && (c != 'u') && (c != 'U')
- && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F')))))
- {
- if (c == '.')
- {
- if (base == 16)
- error ("floating constant may not be in radix 16");
- if (floatflag == AFTER_POINT)
- {
- error ("malformed floating constant");
- floatflag = TOO_MANY_POINTS;
- }
- else
- floatflag = AFTER_POINT;
-
- base = 10;
- *p++ = c = getc (finput);
- /* Accept '.' as the start of a floating-point number
- only when it is followed by a digit.
- Otherwise, unread the following non-digit
- and use the '.' as a structural token. */
- if (p == token_buffer + 2 && !isdigit (c))
- {
- if (c == '.')
- {
- c = getc (finput);
- if (c == '.')
- {
- *p++ = c;
- *p = 0;
- return ELLIPSIS;
- }
- error ("parse error at `..'");
- }
- ungetc (c, finput);
- token_buffer[1] = 0;
- value = '.';
- goto done;
- }
- }
- else
- {
- /* It is not a decimal point.
- It should be a digit (perhaps a hex digit). */
-
- if (isdigit (c))
- {
- c = c - '0';
- }
- else if (base <= 10)
- {
- if ((c&~040) == 'E')
- {
- base = 10;
- floatflag = AFTER_POINT;
- break; /* start of exponent */
- }
- error ("nondigits in number and not hexadecimal");
- c = 0;
- }
- else if (c >= 'a')
- {
- c = c - 'a' + 10;
- }
- else
- {
- c = c - 'A' + 10;
- }
- if (c >= largest_digit)
- largest_digit = c;
- numdigits++;
-
- for (count = 0; count < 8; count++)
- {
- shorts[count] *= base;
- if (count)
- {
- shorts[count] += (shorts[count-1] >> 8);
- shorts[count-1] &= (1<<8)-1;
- }
- else shorts[0] += c;
- }
-
- if (shorts[7] >= 1<<8
- || shorts[7] < - (1 << 8))
- overflow = TRUE;
-
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = (c = getc (finput));
- }
- }
-
- if (numdigits == 0)
- error ("numeric constant with no digits");
-
- if (largest_digit >= base)
- error ("numeric constant contains digits beyond the radix");
-
- /* Remove terminating char from the token buffer and delimit the string */
- *--p = 0;
-
- if (floatflag != NOT_FLOAT)
- {
- tree type = double_type_node;
- char f_seen = 0;
- char l_seen = 0;
- REAL_VALUE_TYPE value;
-
- /* Read explicit exponent if any, and put it in tokenbuf. */
-
- if ((c == 'e') || (c == 'E'))
- {
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- if ((c == '+') || (c == '-'))
- {
- *p++ = c;
- c = getc (finput);
- }
- if (! isdigit (c))
- error ("floating constant exponent has no digits");
- while (isdigit (c))
- {
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- }
- }
-
- *p = 0;
- errno = 0;
- value = REAL_VALUE_ATOF (token_buffer);
- #ifdef ERANGE
- if (errno == ERANGE && !flag_traditional)
- {
- char *p1 = token_buffer;
- /* Check for "0.0" and variants;
- Sunos 4 spuriously returns ERANGE for them. */
- while (*p1 == '0') p1++;
- if (*p1 == '.')
- {
- p1++;
- while (*p1 == '0') p1++;
- }
- if (*p1 == 'e' || *p1 == 'E')
- {
- /* with significand==0, ignore the exponent */
- p1++;
- while (*p1 != 0) p1++;
- }
- /* ERANGE is also reported for underflow,
- so test the value to distinguish overflow from that. */
- if (*p1 != 0 && (value > 1.0 || value < 1.0))
- warning ("floating point number exceeds range of `double'");
- }
- #endif
-
- /* Read the suffixes to choose a data type. */
- while (1)
- {
- if (c == 'f' || c == 'F')
- {
- float floater;
- if (f_seen)
- error ("two `f's in floating constant");
- f_seen = 1;
- type = float_type_node;
- floater = value;
- value = floater;
- }
- else if (c == 'l' || c == 'L')
- {
- if (l_seen)
- error ("two `l's in floating constant");
- l_seen = 1;
- type = long_double_type_node;
- }
- else
- {
- if (isalnum (c))
- {
- error ("garbage at end of number");
- while (isalnum (c))
- {
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- }
- }
- break;
- }
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- }
-
- /* Create a node with determined type and value. */
- yylval.ttype = build_real (type, value);
-
- ungetc (c, finput);
- *p = 0;
- }
- else
- {
- tree type;
- int spec_unsigned = 0;
- int spec_long = 0;
- int spec_long_long = 0;
-
- while (1)
- {
- if (c == 'u' || c == 'U')
- {
- if (spec_unsigned)
- error ("two `u's in integer constant");
- spec_unsigned = 1;
- }
- else if (c == 'l' || c == 'L')
- {
- if (spec_long)
- {
- if (spec_long_long)
- error ("three `l's in integer constant");
- else if (pedantic)
- warning ("ANSI C forbids long long integer constants");
- spec_long_long = 1;
- }
- spec_long = 1;
- }
- else
- {
- if (isalnum (c))
- {
- error ("garbage at end of number");
- while (isalnum (c))
- {
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- }
- }
- break;
- }
- if (p >= token_buffer + maxtoken - 3)
- p = extend_token_buffer (p);
- *p++ = c;
- c = getc (finput);
- }
-
- ungetc (c, finput);
-
- if ((overflow || shorts[7] || shorts[6] || shorts[5] || shorts[4])
- && !spec_long_long)
- warning ("integer constant out of range");
-
- /* If it won't fit in a signed long long, make it unsigned.
- We can't distinguish based on the tree node because
- any integer constant fits any long long type. */
- if (shorts[7] >= (1<<8))
- spec_unsigned = 1;
-
- /* This is simplified by the fact that our constant
- is always positive. */
- yylval.ttype
- = (build_int_2
- ((shorts[3]<<24) + (shorts[2]<<16) + (shorts[1]<<8) + shorts[0],
- (spec_long_long
- ? (shorts[7]<<24) + (shorts[6]<<16) + (shorts[5]<<8) + shorts[4]
- : 0)));
-
- if (!spec_long && !spec_unsigned
- && int_fits_type_p (yylval.ttype, integer_type_node))
- type = integer_type_node;
-
- else if (!spec_long && base != 10
- && int_fits_type_p (yylval.ttype, unsigned_type_node))
- type = unsigned_type_node;
-
- else if (!spec_unsigned && !spec_long_long
- && int_fits_type_p (yylval.ttype, long_integer_type_node))
- type = long_integer_type_node;
-
- else if (! spec_long_long
- && int_fits_type_p (yylval.ttype,
- long_unsigned_type_node))
- type = long_unsigned_type_node;
-
- else if (! spec_unsigned
- && int_fits_type_p (yylval.ttype,
- long_long_integer_type_node))
- type = long_long_integer_type_node;
-
- else if (int_fits_type_p (yylval.ttype,
- long_long_unsigned_type_node))
- type = long_long_unsigned_type_node;
-
- else
- {
- type = long_long_integer_type_node;
- warning ("integer constant out of range");
- }
-
- TREE_TYPE (yylval.ttype) = type;
- }
-
- value = CONSTANT; break;
- }
-
- case '\'':
- char_constant:
- {
- register int result = 0;
- register num_chars = 0;
- int width = TYPE_PRECISION (char_type_node);
- int max_chars;
-
- if (wide_flag) width = TYPE_PRECISION (integer_type_node);
-
- max_chars = TYPE_PRECISION (integer_type_node) / width;
-
- while (1)
- {
- tryagain:
-
- c = getc (finput);
-
- if (c == '\'' || c == EOF)
- break;
-
- if (c == '\\')
- {
- c = readescape ();
- if (c < 0)
- goto tryagain;
- if (width < HOST_BITS_PER_INT
- && (unsigned) c >= (1 << width))
- warning ("escape sequence out of range for character");
- }
- else if (c == '\n')
- {
- if (pedantic)
- warning ("ANSI C forbids newline in character constant");
- lineno++;
- }
-
- num_chars++;
- if (num_chars > maxtoken - 4)
- extend_token_buffer (token_buffer);
-
- token_buffer[num_chars] = c;
-
- /* Merge character into result; ignore excess chars. */
- if (num_chars < max_chars + 1)
- {
- if (width < HOST_BITS_PER_INT)
- result = (result << width) | (c & ((1 << width) - 1));
- else
- result = c;
- }
- }
-
- token_buffer[num_chars + 1] = '\'';
- token_buffer[num_chars + 2] = 0;
-
- if (c != '\'')
- error ("malformatted character constant");
- else if (num_chars == 0)
- error ("empty character constant");
- else if (num_chars > max_chars)
- {
- num_chars = max_chars;
- error ("character constant too long");
- }
- else if (num_chars != 1 && ! flag_traditional)
- warning ("multi-character character constant");
-
- /* If char type is signed, sign-extend the constant. */
- if (! wide_flag)
- {
- int num_bits = num_chars * width;
- if (TREE_UNSIGNED (char_type_node)
- || ((result >> (num_bits - 1)) & 1) == 0)
- yylval.ttype
- = build_int_2 (result & ((unsigned) ~0
- >> (HOST_BITS_PER_INT - num_bits)),
- 0);
- else
- yylval.ttype
- = build_int_2 (result | ~((unsigned) ~0
- >> (HOST_BITS_PER_INT - num_bits)),
- -1);
- }
- else
- yylval.ttype = build_int_2 (result, 0);
-
- TREE_TYPE (yylval.ttype) = integer_type_node;
- value = CONSTANT; break;
- }
-
- case '"':
- string_constant:
- {
- int *widep;
-
- c = getc (finput);
- p = token_buffer + 1;
-
- if (wide_flag)
- widep = wide_buffer;
-
- while (c != '"' && c >= 0)
- {
- if (c == '\\')
- {
- c = readescape ();
- if (c < 0)
- goto skipnewline;
- if (!wide_flag && c >= (1 << TYPE_PRECISION (char_type_node)))
- warning ("escape sequence out of range for character");
- }
- else if (c == '\n')
- {
- if (pedantic)
- warning ("ANSI C forbids newline in string constant");
- lineno++;
- }
-
- /* Store the char in C into the appropriate buffer. */
-
- if (wide_flag)
- {
- if (widep == wide_buffer + max_wide)
- {
- int n = widep - wide_buffer;
- max_wide *= 2;
- wide_buffer = (int *) xrealloc (wide_buffer, max_wide + 1);
- widep = wide_buffer + n;
- }
- *widep++ = c;
- }
- else
- {
- if (p == token_buffer + maxtoken)
- p = extend_token_buffer (p);
- *p++ = c;
- }
-
- skipnewline:
- c = getc (finput);
- }
-
- /* We have read the entire constant.
- Construct a STRING_CST for the result. */
-
- if (wide_flag)
- {
- /* If this is a L"..." wide-string, make a vector
- of the ints in wide_buffer. */
- *widep = 0;
- /* We have not implemented the case where `int'
- on the target and on the execution machine differ in size. */
- if (TYPE_PRECISION (integer_type_node)
- != sizeof (int) * BITS_PER_UNIT)
- abort ();
- yylval.ttype
- = build_string ((widep - wide_buffer + 1) * sizeof (int),
- wide_buffer);
- TREE_TYPE (yylval.ttype) = int_array_type_node;
- }
- else
- {
- *p = 0;
- yylval.ttype = build_string (p - token_buffer, token_buffer + 1);
- TREE_TYPE (yylval.ttype) = char_array_type_node;
- }
-
- *p++ = '"';
- *p = 0;
-
- value = STRING; break;
- }
-
- case '+':
- case '-':
- case '&':
- case '|':
- case '<':
- case '>':
- case '*':
- case '/':
- case '%':
- case '^':
- case '!':
- case '=':
- {
- register int c1;
-
- combine:
-
- switch (c)
- {
- case '+':
- yylval.code = PLUS_EXPR; break;
- case '-':
- yylval.code = MINUS_EXPR; break;
- case '&':
- yylval.code = BIT_AND_EXPR; break;
- case '|':
- yylval.code = BIT_IOR_EXPR; break;
- case '*':
- yylval.code = MULT_EXPR; break;
- case '/':
- yylval.code = TRUNC_DIV_EXPR; break;
- case '%':
- yylval.code = TRUNC_MOD_EXPR; break;
- case '^':
- yylval.code = BIT_XOR_EXPR; break;
- case LSHIFT:
- yylval.code = LSHIFT_EXPR; break;
- case RSHIFT:
- yylval.code = RSHIFT_EXPR; break;
- case '<':
- yylval.code = LT_EXPR; break;
- case '>':
- yylval.code = GT_EXPR; break;
- }
-
- token_buffer[1] = c1 = getc (finput);
- token_buffer[2] = 0;
-
- if (c1 == '=')
- {
- switch (c)
- {
- case '<':
- value = ARITHCOMPARE; yylval.code = LE_EXPR; goto done;
- case '>':
- value = ARITHCOMPARE; yylval.code = GE_EXPR; goto done;
- case '!':
- value = EQCOMPARE; yylval.code = NE_EXPR; goto done;
- case '=':
- value = EQCOMPARE; yylval.code = EQ_EXPR; goto done;
- }
- value = ASSIGN; goto done;
- }
- else if (c == c1)
- switch (c)
- {
- case '+':
- value = PLUSPLUS; goto done;
- case '-':
- value = MINUSMINUS; goto done;
- case '&':
- value = ANDAND; goto done;
- case '|':
- value = OROR; goto done;
- case '<':
- c = LSHIFT;
- goto combine;
- case '>':
- c = RSHIFT;
- goto combine;
- }
- else if ((c == '-') && (c1 == '>'))
- { value = POINTSAT; goto done; }
- ungetc (c1, finput);
- token_buffer[1] = 0;
-
- if ((c == '<') || (c == '>'))
- value = ARITHCOMPARE;
- else value = c;
- goto done;
- }
-
- case 0:
- /* Don't make yyparse think this is eof. */
- value = 1;
- break;
-
- default:
- value = c;
- }
-
- done:
- /* yylloc.last_line = lineno; */
-
- return value;
- }
-